summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-07-17 05:46:32 +0000
committerJeremy Katz <katzj@redhat.com>2002-07-17 05:46:32 +0000
commit3365968c0067cdd781efe666222cb84ee9434afd (patch)
tree724a24be09c26f054f73799b35f01c0aa254d516
parentc7ebfa7640c594ba133a5b223129e20e2c8fa32f (diff)
downloadanaconda-3365968c0067cdd781efe666222cb84ee9434afd.tar.gz
anaconda-3365968c0067cdd781efe666222cb84ee9434afd.tar.xz
anaconda-3365968c0067cdd781efe666222cb84ee9434afd.zip
make language support group selection a tad bit cleaner and move it to be before package-selection so that the size is right
-rw-r--r--dispatch.py4
-rw-r--r--installclass.py23
-rw-r--r--packages.py23
3 files changed, 23 insertions, 27 deletions
diff --git a/dispatch.py b/dispatch.py
index 4bda60f9f..525120509 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -25,7 +25,7 @@ from packages import doPreInstall, doPostInstall, doPostAction
from autopart import doAutoPartition
from packages import firstbootConfiguration
from packages import betaNagScreen
-from packages import packageGroupSelectHack
+from packages import selectLanguageSupportGroups
from partitioning import partitionMethodSetup, partitionObjectsInitialize
from partitioning import partitioningComplete
from floppy import makeBootdisk
@@ -100,8 +100,8 @@ installSteps = [
("desktopchoice", ("intf", "dispatch")),
("findpackages", upgradeFindPackages, ("intf", "method", "id",
"instPath", "dir")),
+ ("selectlangpackages", selectLanguageSupportGroups, ("id",)),
("package-selection", ("id.comps", "dispatch")),
- ("package-group-select-hack", packageGroupSelectHack, ("id.instClass", "id",)),
("indivpackage", ("id.comps", "id.hdList")),
("handleX11pkgs", handleX11Packages, ("dir", "intf", "dispatch",
"id", "instPath")),
diff --git a/installclass.py b/installclass.py
index 4a4bec73c..3fb1b8150 100644
--- a/installclass.py
+++ b/installclass.py
@@ -57,27 +57,6 @@ class BaseInstallClass:
# we can use a different install data class
installDataClass = InstallData
- # FIXME: THIS IS A HORRIBLE HACK AND MUST GO AWAY
- def selectDependentHiddenGroups(self, id):
- sup = id.langSupport.supported
- if len(sup) == 0:
- sup = id.langSupport.getAllSupported()
-
- for group in id.comps.compsxml.groups.values():
- for name in sup:
- try:
- lang = id.langSupport.langInfoByName[name][0]
- langs = language.expandLangs(lang)
- except:
- continue
- if group.langonly in langs:
- if not id.comps.compsDict.has_key(group.name):
- log("Where did the %s component go?"
- %(group.name,))
- continue
- id.comps.compsDict[group.name].select()
- return
-
def postAction(self, rootPath, serial):
pass
@@ -139,8 +118,8 @@ class BaseInstallClass:
"accounts",
"authentication",
"readcomps",
+ "selectlangpackages",
"package-selection",
- "package-group-select-hack",
"handleX11pkgs",
"checkdeps",
"dependencies",
diff --git a/packages.py b/packages.py
index 96a01df2c..94c366c84 100644
--- a/packages.py
+++ b/packages.py
@@ -971,6 +971,23 @@ def betaNagScreen(intf, dir):
else:
break
-# FIXME: this is really a poor way to do this
-def packageGroupSelectHack(instClass, id):
- instClass.selectDependentHiddenGroups(id)
+# FIXME: this is a kind of poor way to do this, but it will work for now
+def selectLanguageSupportGroups(id):
+ sup = id.langSupport.supported
+ if len(sup) == 0:
+ sup = id.langSupport.getAllSupported()
+
+ for group in id.comps.compsxml.groups.values():
+ for name in sup:
+ try:
+ lang = id.langSupport.langInfoByName[name][0]
+ langs = language.expandLangs(lang)
+ except:
+ continue
+ if group.langonly in langs:
+ if not id.comps.compsDict.has_key(group.name):
+ log("Where did the %s component go?"
+ %(group.name,))
+ continue
+ id.comps.compsDict[group.name].select()
+