summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-05-24 17:28:56 +0000
committerChris Lumens <clumens@redhat.com>2005-05-24 17:28:56 +0000
commit01cf8fda2a3de056a7eb7a808ba78116a96a0e29 (patch)
tree5bcad9a9ac7d17e6672b9918b97a94a3ff17b22c
parentab80ec7c960ef063f253d3daf9ce1a9385e5e49e (diff)
downloadanaconda-01cf8fda2a3de056a7eb7a808ba78116a96a0e29.tar.gz
anaconda-01cf8fda2a3de056a7eb7a808ba78116a96a0e29.tar.xz
anaconda-01cf8fda2a3de056a7eb7a808ba78116a96a0e29.zip
Automatically select any conditional packages that are required by
currently selected groups. This step used to be only needed for parts of language support, but is now needed more widely (#154572, #158389).
-rw-r--r--ChangeLog10
-rw-r--r--dispatch.py2
-rw-r--r--installclass.py1
-rw-r--r--packages.py49
-rw-r--r--upgradeclass.py1
5 files changed, 43 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index edec4245c..2d54b5dcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-24 Chris Lumens <clumens@redhat.com>
+
+ * packages.py: Automatically select any conditional packages that
+ are required by currently selected groups. This step used to be only
+ needed for parts of language support, but is now needed more widely
+ (#154572, #158389).
+ * dispatch.py (installSteps): Likewise.
+ * installclass.py (BaseInstallClass.setSteps): Likewise.
+ * upgradeclass.py (BaseInstallClass.setSteps): Likewise.
+
2005-05-23 Jeremy Katz <katzj@redhat.com>
* anaconda.spec: Bump version.
diff --git a/dispatch.py b/dispatch.py
index e372d5e4a..9a92f0e80 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -30,6 +30,7 @@ from packages import betaNagScreen
from packages import selectLanguageSupportGroups
from packages import setupTimezone
from packages import setFileCons
+from packages import fixupConditionals
from partitioning import partitionMethodSetup, partitionObjectsInitialize
from partitioning import partitioningComplete
from floppy import makeBootdisk
@@ -115,6 +116,7 @@ installSteps = [
("handleX11pkgs", handleX11Packages, ("dir", "intf", "dispatch",
"id", "instPath")),
("handlemiscpkgs", handleMiscPackages, ("intf", "id", "dir")),
+ ("fixupconditionals", fixupConditionals, ("id.grpset",)),
("checkdeps", checkDependencies, ("dir", "intf", "dispatch",
"id", "instPath")),
("dependencies", ("id.grpset", "id.dependencies")),
diff --git a/installclass.py b/installclass.py
index 882191ce0..596a53236 100644
--- a/installclass.py
+++ b/installclass.py
@@ -143,6 +143,7 @@ class BaseInstallClass:
"package-selection",
"handleX11pkgs",
"handlemiscpkgs",
+ "fixupconditionals",
"checkdeps",
"dependencies",
"confirminstall",
diff --git a/packages.py b/packages.py
index 4440a21dc..d846d2919 100644
--- a/packages.py
+++ b/packages.py
@@ -1568,8 +1568,31 @@ def betaNagScreen(intf, dir):
break
# FIXME: this is a kind of poor way to do this, but it will work for now
+def selectPackageConditionals(grpset, grp):
+ xmlgrp = grpset.compsxml.groups[grp.basename]
+
+ for package in xmlgrp.pkgConditionals.keys():
+ req = xmlgrp.pkgConditionals[package]
+ if not grpset.hdrlist.has_key(package):
+ log ("Missing %s which is in a conditional" %(package,))
+ continue
+ # add to the deps in the dependencies structure for the
+ # package. this should take care of whenever we're
+ # selected
+ grpset.hdrlist[req].addDeps([package], main = 0)
+ if grpset.hdrlist[req].isSelected():
+ grpset.hdrlist[package].select()
+ grpset.hdrlist[package].usecount += grpset.hdrlist[req].usecount - 1
+ grp.selectDeps([package], uses = grpset.hdrlist[req].usecount)
+
+# Loop over all the selected groups and make sure all the conditionals are
+# met.
+def fixupConditionals(grpset):
+ for grp in grpset.groups:
+ if grpset.groups[grp].isSelected():
+ selectPackageConditionals(grpset, grpset.groups[grp])
+
def selectLanguageSupportGroups(grpset, instLanguage):
- anySelected = False
if not grpset.groups.has_key("language-support"):
return
@@ -1584,25 +1607,11 @@ def selectLanguageSupportGroups(grpset, instLanguage):
if not grpset.groups.has_key(pid):
continue
group = grpset.groups[pid]
- xmlgrp = grpset.compsxml.groups[group.basename]
if group.langonly is not None and group.langonly in langs:
grp.selectPackage(pid)
- for package in xmlgrp.pkgConditionals.keys():
- req = xmlgrp.pkgConditionals[package]
- if not grpset.hdrlist.has_key(package):
- log("Missing %s which is in a langsupport conditional" %(package,))
- continue
- # add to the deps in the dependencies structure for the
- # package. this should take care of whenever we're
- # selected
- grpset.hdrlist[req].addDeps([package], main = 0)
- if grpset.hdrlist[req].isSelected():
- grpset.hdrlist[package].select()
- anySelected = True
- grpset.hdrlist[package].usecount += grpset.hdrlist[req].usecount - 1
- group.selectDeps([package], uses = grpset.hdrlist[req].usecount)
-
- # If no language support packages are selected, unselect the group too.
- if not anySelected:
- grpset.groups["language-support"].unselect()
+ grp.usecount = grp.usecount + 1
+ selectPackageConditionals(grpset, group)
+
+ if grp.usecount > 0:
+ grpset.groups["language-support"].select()
diff --git a/upgradeclass.py b/upgradeclass.py
index 80d1c10f2..395476be9 100644
--- a/upgradeclass.py
+++ b/upgradeclass.py
@@ -42,6 +42,7 @@ class InstallClass(BaseInstallClass):
"findpackages",
"upgbootloader",
"handlemiscpkgs",
+ "fixupconditionals",
"checkdeps",
"dependencies",
"confirmupgrade",