summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py37
1 files changed, 32 insertions, 5 deletions
diff --git a/todo.py b/todo.py
index 137f0a062..1befb9310 100644
--- a/todo.py
+++ b/todo.py
@@ -653,6 +653,38 @@ class ToDo:
out = open (self.instPath + "/etc/conf.modules", "w")
out.write (inf.read ())
+ def verifyDeps (self):
+ ts = rpm.TransactionSet()
+ self.comps['Base'].select (1)
+
+ for p in self.hdList.packages.values ():
+ if p.selected:
+ ts.add(p.h, (p.h, p.h[rpm.RPMTAG_NAME]))
+ else:
+ ts.add(p.h, (p.h, p.h[rpm.RPMTAG_NAME]), "a")
+
+ ts.order()
+ deps = ts.depcheck()
+ rc = []
+ if deps:
+ for ((name, version, release),
+ (reqname, reqversion),
+ flags, suggest, sense) in deps:
+ if sense == rpm.RPMDEP_SENSE_REQUIRES:
+ if suggest:
+ (header, sugname) = suggest
+ else:
+ sugname = _("no suggestion")
+ if not (name, sugname) in rc:
+ rc.append ((name, sugname))
+ return rc
+ else:
+ return None
+
+ def selectDeps (self, deps):
+ for (who, dep) in deps:
+ self.hdList[dep].selected = 1
+
def doInstall(self, intf):
# make sure we have the header list and comps file
self.getHeaderList()
@@ -661,11 +693,6 @@ class ToDo:
# make sure that all comps that include other comps are
# selected (i.e. - recurse down the selected comps and turn
# on the children
-
- for comp in self.comps:
- if comp.selected:
- comp.select(1)
-
if self.setupFilesystems:
self.ddruid.save ()
self.makeFilesystems ()