[yum-cvs] yum/repomd packageSack.py,1.20,1.21

Seth Vidal skvidal at login.linux.duke.edu
Fri Mar 4 18:29:37 UTC 2005


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

Modified Files:
	packageSack.py 
Log Message:

- made excludeArches in repomd pkgsack and sqlite pkgsack.
- makes more sense to be in that class
- sql select is a bit faster than iterating all the packages and comparing


Index: packageSack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/repomd/packageSack.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- packageSack.py	18 Jan 2005 06:07:19 -0000	1.20
+++ packageSack.py	4 Mar 2005 18:29:35 -0000	1.21
@@ -296,7 +296,14 @@
         for pkg in self.returnPackages():
             print pkg.returnNevraPrintable()
 
+    def excludeArches(self, archlist):
+        """exclude incompatible arches. archlist is a list of compatible arches"""
         
+        for pkg in self.returnPackages():
+            if pkg.arch not in archlist:
+                self.delPackage(pkg)
+
+
 
 # packageSack should be a base class
 # two derived classes could be DBPackageSack and XMLPackageSack




More information about the Yum-cvs-commits mailing list