[yum-cvs] yum/yum depsolve.py,1.162,1.163

Jeremy Katz katzj at linux.duke.edu
Tue Apr 24 21:02:53 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv8951/yum

Modified Files:
	depsolve.py 
Log Message:
>From Gijs Hollestelle --

I managed to trace it to the already_seen cache in depsolver.py it
turns out that  when resolveDeps has missing requirements and restarts
the depsolving loop the packages that caused that missing requirements
are marked as already seen in the cache and their dependencies not
always resolved again, this causes problems at least in the case of an
upgrade but I can imagine that it could cause other problems as well.

I've included a small patch to fix this, it removes all packages
resulting in missing dependencies from the already seen cache before
starting the next round of depsolving.


Index: depsolve.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -r1.162 -r1.163
--- depsolve.py	24 Apr 2007 19:45:19 -0000	1.162
+++ depsolve.py	24 Apr 2007 21:02:50 -0000	1.163
@@ -863,6 +863,17 @@
                 dep_proc_time = dep_end_time - dep_start_time
                 self.verbose_logger.log(logginglevels.DEBUG_2, 'processing dep took: %f', dep_proc_time)
                 
+                if missing:
+                    # If we have missing requires make sure we process
+                    # packages that need them again by removing them
+                    # from the already_seen cache instead of blindly 
+                    # assuming that we already completely resolved their
+                    # problems
+                    for curpkg in self.dcobj.already_seen.keys():
+                        if curpkg.name == needname:
+                            del(self.dcobj.already_seen[curpkg])
+
+
                 missingdep += missing
                 conflicts += conflict
                 CheckDeps |= checkdep




More information about the Yum-cvs-commits mailing list