[yum-cvs] yum/yum __init__.py,1.157,1.158 misc.py,1.12,1.13

Seth Vidal skvidal at login.linux.duke.edu
Sat Dec 3 17:12:42 UTC 2005


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

Modified Files:
	__init__.py misc.py 
Log Message:

kill off sortPkgObj() from __init__
remove excludeNonCompatArch as it was trivial and useless


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- __init__.py	3 Dec 2005 08:28:15 -0000	1.157
+++ __init__.py	3 Dec 2005 17:12:39 -0000	1.158
@@ -276,7 +276,8 @@
         self.repos.populateSack(which=repos)
         self.pkgSack = self.repos.pkgSack
         self.excludePackages()
-        self.excludeNonCompatArchs(archlist=archlist)
+        self.pkgSack.excludeArchs(archlist)
+
         for repo in repos:
             self.excludePackages(repo)
             self.includePackages(repo)
@@ -436,18 +437,6 @@
             
         self.log(2, 'Finished')
         
-    def excludeNonCompatArchs(self, archlist=None):
-        """runs through the whole packageSack and excludes any arch not compatible
-           with the system"""
-        
-        self.log(3, 'Excluding Incompatible Archs')
-        if not archlist:
-            archlist.extend(rpmUtils.arch.getArchList())
-        self.pkgSack.excludeArchs(archlist)
-        self.log(3, 'Finished')
-        
-        
-        
     def doLock(self, lockfile):
         """perform the yum locking, raise yum-based exceptions, not OSErrors"""
         
@@ -873,15 +862,6 @@
         msg = '%d metadata files removed' % removed
         return 0, [msg]
 
-    def sortPkgObj(self, pkg1 ,pkg2):
-        """sorts a list of package tuples by name"""
-        if pkg1.name > pkg2.name:
-            return 1
-        elif pkg1.name == pkg2.name:
-            return 0
-        else:
-            return -1
-        
     def doPackageLists(self, pkgnarrow='all'):
         """generates lists of packages, un-reduced, based on pkgnarrow option"""
         

Index: misc.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/misc.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- misc.py	8 Aug 2005 15:45:30 -0000	1.12
+++ misc.py	3 Dec 2005 17:12:39 -0000	1.13
@@ -287,3 +287,13 @@
     # make the dir (tempfile.mkdtemp())
     cachedir = tempfile.mkdtemp(prefix=prefix, dir=tmpdir)
     return cachedir
+
+def sortPkgObj(pkg1 ,pkg2):
+    """sorts a list of yum package objects by name"""
+    if pkg1.name > pkg2.name:
+        return 1
+    elif pkg1.name == pkg2.name:
+        return 0
+    else:
+        return -1
+        




More information about the Yum-cvs-commits mailing list