[Yum-devel] depsolver progress patch

Chris Lumens clumens at redhat.com
Thu Mar 29 17:51:46 UTC 2007


Looking at why the anaconda dependency progress bar never moves, I found
two small things.  First, we're never calling pkgAdded in _resolveDeps
so the progress bar is never getting updated.  Second, we're never
initializing the progress bar with the number of things to check so we
don't know how big to make the increments.

The attached patch takes us back to the level of brokenness we had in
anaconda several weeks ago.  I'm sure there's still plenty of room for
improvement.

- Chris
-------------- next part --------------
Index: yum/depsolve.py
===================================================================
RCS file: /cvsroot/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.147
diff -u -r1.147 depsolve.py
--- yum/depsolve.py	28 Mar 2007 08:48:48 -0000	1.147
+++ yum/depsolve.py	29 Mar 2007 17:48:31 -0000
@@ -883,6 +883,10 @@
             
             if self.dcobj.already_seen.has_key(txmbr):
                 continue
+
+            if self.dsCallback: 
+                self.dsCallback.pkgAdded(txmbr.pkgtup, txmbr.ts_state)
+
             self.verbose_logger.log(logginglevels.INFO_2,
                                     "Checking deps for %s" %(txmbr,))
             if txmbr.output_state in (TS_INSTALL, TS_TRUEINSTALL, TS_OBSOLETING):
@@ -908,7 +912,7 @@
         while CheckDeps:
             self.cheaterlookup = {} # short cache for some information we'd resolve
                                     # (needname, needversion) = pkgtup
-            if self.dsCallback: self.dsCallback.tscheck()
+            if self.dsCallback: self.dsCallback.tscheck(len(self.tsInfo.getMembers()))
             deps = self._mytsCheck()
 
             if not deps:


More information about the Yum-devel mailing list