diff options
author | Matt Wilson <msw@redhat.com> | 2000-01-17 00:25:17 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-01-17 00:25:17 +0000 |
commit | 416d73b84048e6b7c1c594df5717a0a5e017cd62 (patch) | |
tree | e64b977852c5e5769c5d32b47f45b0a0dc60e885 /todo.py | |
parent | d235c4e5113b29aae33f72188f9085830b93813b (diff) | |
download | anaconda-416d73b84048e6b7c1c594df5717a0a5e017cd62.tar.gz anaconda-416d73b84048e6b7c1c594df5717a0a5e017cd62.tar.xz anaconda-416d73b84048e6b7c1c594df5717a0a5e017cd62.zip |
fixes to upgrade depencency checking code, and GNOME autoselect code
Diffstat (limited to 'todo.py')
-rw-r--r-- | todo.py | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -781,9 +781,13 @@ class ToDo: out = open (self.instPath + "/etc/conf.modules", "a") out.write (inf.read ()) - def verifyDeps (self): + def verifyDeps (self, path = None, db = None): self.getCompsList() - ts = rpm.TransactionSet() + if path and db: + ts = rpm.TransactionSet(path, db) + else: + ts = rpm.TransactionSet() + self.comps['Base'].select (1) for p in self.hdList.packages.values (): @@ -912,13 +916,23 @@ class ToDo: hasX = 1 if package[rpm.RPMTAG_NAME] == "gmc": hasgmc = 1 - - # yes, this is rude + + # open up the database to check dependencies + db = rpm.opendb (0, self.instPath) + + # if we have X but not gmc, we need to turn on GNOME. We only + # want to turn on packages we don't have installed already, though. if hasX and not hasgmc: - self.comps['GNOME'].select(1) + for package in self.comps['GNOME'].items.keys (): + rec = db.findbyname (package) + if not rec: + self.comps['GNOME'].items[package].selected = 1 # new package dependency fixup - self.selectDeps (self.verifyDeps ()) + deps = self.verifyDeps (self.instPath, db) + for (name, suggest) in deps: + self.log ("Upgrade Dependency: %s needs %s, automatically added.", name, suggest) + self.selectDeps (deps) win.pop () def rpmError (todo): |