[yum-cvs] yum/yum depsolve.py,1.116,1.117

Jeremy Katz katzj at linux.duke.edu
Wed Feb 14 22:08:32 UTC 2007


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

Modified Files:
	depsolve.py 
Log Message:
make it so that we see that the local rpm is present and then don't download
rather than requiring API callers to specify what to do


Index: depsolve.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- depsolve.py	14 Feb 2007 20:41:36 -0000	1.116
+++ depsolve.py	14 Feb 2007 22:08:29 -0000	1.117
@@ -120,7 +120,7 @@
         
         return 0
 
-    def populateTs(self, test=0, keepold=1, noheaders=False):
+    def populateTs(self, test=0, keepold=1):
         """take transactionData class and populate transaction set"""
 
         if self.dsCallback: self.dsCallback.transactionPopulation()
@@ -148,14 +148,11 @@
                 if ts_elem.has_key((txmbr.pkgtup, 'i')):
                     continue
                 rpmfile = txmbr.po.localPkg()
-                if not noheaders:
+                if os.path.exists(rpmfile):
+                    hdr = txmbr.po.returnHeaderFromPackage(self.ts)
+                else:
                     self.downloadHeader(txmbr.po)
                     hdr = txmbr.po.returnLocalHeader()
-                else:
-                    # get header from the rpm itself
-                    # maybe we should check to see if the file exists, first?
-
-                    hdr = txmbr.po.returnHeaderFromPackage(self.ts)
                 
                 if txmbr.ts_state == 'u':
                     if self.allowedMultipleInstalls(txmbr.po):




More information about the Yum-cvs-commits mailing list