[yum-cvs] yum/yum __init__.py,1.152,1.153

Seth Vidal skvidal at login.linux.duke.edu
Mon Nov 21 05:10:45 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv22455/yum

Modified Files:
	__init__.py 
Log Message:

pass updates off to update() from install() if that's where they should be


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- __init__.py	21 Nov 2005 03:58:17 -0000	1.152
+++ __init__.py	21 Nov 2005 05:10:43 -0000	1.153
@@ -1536,7 +1536,8 @@
         self.doRepoSetup()
         self.doSackSetup()
         self.doRpmDBSetup()
-
+        self.doUpdateSetup()
+        
         pkgs = []
         if po:
             pkgs.append(po)
@@ -1580,11 +1581,15 @@
         
         tx_return = []
         for po in pkgs:
-            txmbrs = self.tsInfo.getMembers(pkgtup=po.pkgtup)
-            if txmbrs:
+            if self.tsInfo.exists(pkgtup=po.pkgtup):
                 self.log(4, 'Package: %s  - already in transaction set' % po)
+                tx_return.extend(self.tsInfo.getMembers(pkgtup=po.pkgtup))
+                continue
+
+            # make sure this shouldn't be passed to update:
+            if self.up.updating_dict.has_key(po.pkgtup):
+                txmbrs = self.update(po=po)
                 tx_return.extend(txmbrs)
-                
             else:
                 txmbr = self.tsInfo.addInstall(po)
                 tx_return.append(txmbr)
@@ -1631,7 +1636,7 @@
                 tx_return.append(txmbr)
                 
             for (new, old) in updates:
-                if self.tsInfo.isObsoleted(pkgtup=old)
+                if self.tsInfo.isObsoleted(pkgtup=old):
                     self.log(5, 'Not Updating Package that is already obsoleted: %s.%s %s:%s-%s' % old)
                 else:
                     updating_pkg = self.getPackageObject(new)
@@ -1646,7 +1651,6 @@
             
             return tx_return
 
-        # this all goes to hell here
         else:
             instpkgs = []
             availpkgs = []




More information about the Yum-cvs-commits mailing list