summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2005-08-19 19:19:35 +0000
committerPaul Nasrat <pnasrat@redhat.com>2005-08-19 19:19:35 +0000
commit178d088703ced025a03421199e0301acdabafa3c (patch)
tree730cb9c5cb5a48ca040ec67fe25b4b68f4e68a7d
parent13709db2f985aaa14e1c14d9acd565f87449ad75 (diff)
Extract readPackages
-rw-r--r--dispatch.py7
-rw-r--r--packages.py65
2 files changed, 5 insertions, 67 deletions
diff --git a/dispatch.py b/dispatch.py
index acb3f013c..f807fadc2 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -16,7 +16,7 @@
import string
from types import *
from constants import *
-from packages import readPackages, checkDependencies, doInstall
+from packages import checkDependencies, doInstall
from packages import handleX11Packages, writeConfiguration, writeXConfiguration
from packages import checkMonitorOK, setSaneXSettings
from packages import writeKSConfiguration, turnOnFilesystems
@@ -107,7 +107,8 @@ installSteps = [
("timezone", ("id.instLanguage", "id.timezone")),
("accounts", ("intf", "id.rootPassword")),
("authentication", ("id.auth",)),
- ("readcomps", readPackages, ("intf", "method", "id")),
+#XXX: factor to backend
+ #("readcomps", readPackages, ("intf", "method", "id")),
#("desktopchoice", ("intf", "id.instClass", "dispatch", "id.grpset")),
#("findpackages", upgradeFindPackages, ("intf", "method", "id", "instPath", "dir")),
#("selectlangpackages", selectLanguageSupportGroups, ("id.grpset","id.instLanguage")),
@@ -117,6 +118,7 @@ installSteps = [
"id", "instPath")),
("handlemiscpkgs", handleMiscPackages, ("intf", "id", "dir")),
("fixupconditionals", fixupConditionals, ("id.grpset",)),
+#XXX: factor to backend
#("checkdeps", checkDependencies, ("dir", "intf", "dispatch", "id", "instPath")),
#("dependencies", ("id.grpset", "id.dependencies")),
("confirminstall", ("intf", "id",)),
@@ -132,6 +134,7 @@ installSteps = [
"dir")),
("preinstallconfig", doPreInstall, ("method", "id", "intf", "instPath",
"dir")),
+#XXX: factor to backend
#("installpackages", doInstall, ("method", "id", "intf", "instPath")),
("installpackages", doYumInstall, ("method", "id", "intf", "instPath")),
("postinstallconfig", doPostInstall, ("method", "id", "intf", "instPath")),
diff --git a/packages.py b/packages.py
index 909c102a1..9cbb2714f 100644
--- a/packages.py
+++ b/packages.py
@@ -144,71 +144,6 @@ def writeXConfiguration(id, instPath):
id.xsetup.write(fn+"/etc/X11", id.mouse, id.keyboard)
id.desktop.write(instPath)
-def readPackages(intf, method, id):
- if id.grpset:
- grpset = id.grpset
- hdrlist = id.grpset.hdrlist
- doselect = 0
- else:
- grpset = None
- hdrlist = None
- doselect = 1
-
- while hdrlist is None:
- w = intf.waitWindow(_("Reading"), _("Reading package information..."))
- try:
- hdrlist = method.readHeaders()
- except FileCopyException, e:
- w.pop()
- method.unmountCD()
- intf.messageWindow(_("Error"),
- _("Unable to read header list. This may be "
- "due to a missing file or bad media. "
- "Press <return> to try again."))
- continue
-
- w.pop()
-
- while grpset is None:
- try:
- grpset = method.readComps(hdrlist)
- except FileCopyException, e:
- method.unmountCD()
- intf.messageWindow(_("Error"),
- _("Unable to read comps file. This may be "
- "due to a missing file or bad media. "
- "Press <return> to try again."))
- continue
-
- # people make bad tree copies all the time. let's just mandate that
- # the Core group has to exist in the comps file else we complain
- if not grpset.groups.has_key("core"):
- intf.messageWindow(_("Error"),
- _("The comps file in your installation tree is "
- "missing critical groups. Please ensure that "
- "your install tree has been correctly "
- "generated."),
- type="custom", custom_icon="error",
- custom_buttons=[_("_Exit")])
- sys.exit(0)
-
-
- # this is a crappy hack, but I don't want bug reports from these people
- if (iutil.getArch() == "i386") and (not grpset.hdrlist.has_key("kernel")):
- intf.messageWindow(_("Error"),
- _("You are trying to install on a machine "
- "which isn't supported by this release of "
- "%s.") %(productName,),
- type="custom", custom_icon="error",
- custom_buttons=[_("_Exit")])
- sys.exit(0)
-
- id.grpset = grpset
-
- if doselect:
- id.instClass.setGroupSelection(grpset, intf)
- id.instClass.setPackageSelection(hdrlist, intf)
-
def handleX11Packages(dir, intf, disp, id, instPath):
if dir == DISPATCH_BACK: