summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-08-22 18:43:31 +0000
committerJeremy Katz <katzj@redhat.com>2002-08-22 18:43:31 +0000
commit912927bac5347953e1a27737b49049dc7407f081 (patch)
treea9d908ac3d7a076c0444953b48f55063c0759ea3 /packages.py
parent5738d24adffa12e51d46be2ba03e020bce76be07 (diff)
downloadanaconda-912927bac5347953e1a27737b49049dc7407f081.tar.gz
anaconda-912927bac5347953e1a27737b49049dc7407f081.tar.xz
anaconda-912927bac5347953e1a27737b49049dc7407f081.zip
fix selection of lang specific packages (ie kde-i18n-foo) for mandatory/dependency packages. Component.addDependencyPackage is only used by this part of packages.py, so changing it is safe
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/packages.py b/packages.py
index 36b6fd848..cdfab075d 100644
--- a/packages.py
+++ b/packages.py
@@ -28,6 +28,7 @@ import kudzu
from flags import flags
from constants import *
from syslogd import syslog
+from comps import PKGTYPE_MANDATORY, PKGTYPE_DEFAULT
from rhpl.log import log
from rhpl.translate import _
@@ -958,6 +959,7 @@ def doPostInstall(method, id, intf, instPath):
# FIXME: hack to install the comps package
if (id.compspkg is not None and
os.access(id.compspkg, os.R_OK)):
+ log("found the comps package")
try:
# ugly hack
path = id.compspkg.split("/mnt/sysimage")[1]
@@ -984,6 +986,8 @@ def doPostInstall(method, id, intf, instPath):
os.unlink(id.compspkg)
except:
pass
+ else:
+ log("no comps package found")
w.set(6)
@@ -1144,8 +1148,22 @@ def selectLanguageSupportGroups(comps, langSupport):
# add to the deps in the dependencies structure --
# this will take care of if we're ever added as a dep
comps.compsxml.packages[req].dependencies.append(package)
- # also add to all components for which the req is
- # registered as PKGTYPE_DEFAULT
+ print "adding %s as a dep of %s" %(package, comps.compsxml.packages[req].name)
+ # also add to components as needed
+ # if the req is PKGTYPE_MANDATORY, then just add to the
+ # depsDict. if the req is PKGTYPE_DEFAULT, add it
+ # as DEFAULT
pkg = comps.packages[package]
for comp in comps.packages[req].comps:
- comp.addPackage(pkg, 1)
+ if comp.newpkgDict.has_key(req):
+ if comp.newpkgDict[req][0] == PKGTYPE_MANDATORY:
+ print "adding %s to comp %s as dep" %(pkg.name, comp.name)
+ comp.addDependencyPackage(pkg)
+ else:
+ print "adding %s to comp %s" %(pkg.name, comp.name)
+ comp.addPackage(pkg, PKGTYPE_DEFAULT)
+ elif comp.depsDict.has_key(req):
+ comp.addDependencyPackage(pkg)
+ else:
+ print "unable to find how %s is in comp %s" %(pkg.name, comp.name)
+ comps.updateSelections()