[yum-cvs] yum/yum __init__.py,1.160,1.161

Seth Vidal skvidal at login.linux.duke.edu
Wed Dec 7 16:45:03 UTC 2005


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

Modified Files:
	__init__.py 
Log Message:

make deselectGroup just look through the tsInfo rather than traversing the
pkgsack for no apparent reason


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- __init__.py	7 Dec 2005 06:13:11 -0000	1.160
+++ __init__.py	7 Dec 2005 16:45:01 -0000	1.161
@@ -1282,14 +1282,11 @@
         thisgroup.selected = False
         
         for pkgname in thisgroup.packages:
-            p = self.pkgSack.searchNevra(name=pkgname)
-            if not p:
-                self.log(4, "no such package %s from group %s" %(pkgname, thisgroup))
-                continue
-            
-            for po in self.bestPackagesFromList(p):
-                txmbrs = self.tsInfo.getMembers(pkgtup = po.pkgtup)
-                for txmbr in txmbrs:
+        
+            for txmbr in self.tsInfo:
+                if txmbr.po.name == pkgname and txmbr.state in [TS_INSTALL,
+                                                                TS_UPDATE,
+                                                                TS_OBSOLETING]
                     try: 
                         txmbr.groups.remove(grpid)
                     except ValueError:
@@ -1298,7 +1295,7 @@
                     
                     # if there aren't any other groups mentioned then remove the pkg
                     if len(txmbr.groups) == 0:
-                        self.tsInfo.remove(po.pkgtup)
+                        self.tsInfo.remove(txmbr.po.pkgtup)
 
                     
         




More information about the Yum-cvs-commits mailing list