[yum-cvs] yum/yum depsolve.py,1.114,1.115

James Bowes jbowes at linux.duke.edu
Wed Feb 14 18:20:48 UTC 2007


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

Modified Files:
	depsolve.py 
Log Message:
Use a boolean for CheckDeps rather than an int

Index: depsolve.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- depsolve.py	14 Feb 2007 17:10:35 -0000	1.114
+++ depsolve.py	14 Feb 2007 18:20:46 -0000	1.115
@@ -1056,7 +1056,7 @@
         return ret
 
     def resolveDeps(self):
-        CheckDeps = 1
+        CheckDeps = True
         conflicts = 0
         missingdep = 0
         depscopy = []
@@ -1065,7 +1065,7 @@
         errors = []
         if self.dsCallback: self.dsCallback.start()
 
-        while CheckDeps > 0:
+        while CheckDeps:
             self.cheaterlookup = {} # short cache for some information we'd resolve
                                     # (needname, needversion) = pkgtup
             if self.dsCallback: self.dsCallback.tscheck()
@@ -1096,13 +1096,13 @@
                                                                           needversion, flags))
 
                         errors.append(msg)
-                    CheckDeps = 0
+                    CheckDeps = False
                     break
             else:
                 unresolveableloop = 0
 
             depscopy = deps
-            CheckDeps = 0
+            CheckDeps = False
 
 
             # things to resolve
@@ -1134,7 +1134,7 @@
                 
                 missingdep += missing
                 conflicts += conflict
-                CheckDeps += checkdep
+                CheckDeps |= checkdep
                 for error in errormsgs:
                     if error not in errors:
                         errors.append(error)
@@ -1143,7 +1143,7 @@
             self.verbose_logger.log(logginglevels.DEBUG_1, 'conf = %d', conflicts)
             self.verbose_logger.log(logginglevels.DEBUG_1, 'CheckDeps = %d', CheckDeps)
 
-            if CheckDeps > 0:
+            if CheckDeps:
                 if self.dsCallback: self.dsCallback.restartLoop()
                 self.verbose_logger.log(logginglevels.DEBUG_1, 'Restarting Loop')
             else:




More information about the Yum-cvs-commits mailing list