extras-repoclosure rc-modified,1.23,1.24

Michael Schwendt mschwendt at fedoraproject.org
Sun Dec 7 09:52:32 UTC 2008


Author: mschwendt

Update of /cvs/fedora/extras-repoclosure
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1639

Modified Files:
	rc-modified 
Log Message:
Python 2.6 finally rejects "with" as an argument name in old Yum.
Need to fall back to calling populateSack without named arguments
in the compatiblity code for old Yum.



Index: rc-modified
===================================================================
RCS file: /cvs/fedora/extras-repoclosure/rc-modified,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- rc-modified	7 Mar 2008 21:20:05 -0000	1.23
+++ rc-modified	7 Dec 2008 09:52:30 -0000	1.24
@@ -99,10 +99,13 @@
         self.doRepoSetup()
         self.doSackSetup(rpmUtils.arch.getArchList(self.arch))
         for repo in self.repos.listEnabled():
-            try:  # TODO: when exactly did this change to "mdtype"?
+            try:  # TODO: when exactly did this change from "with=" to "mdtype="?
                 self.repos.populateSack(which=[repo.id], mdtype='filelists')
             except TypeError:
-                self.repos.populateSack(which=[repo.id], with='filelists')
+                # Retry without named arguments for compatibility with older
+                # Yum. Can't used "with=" here because finally it's a fatal
+                # error in Python >= 2.6 
+                self.repos.populateSack([repo.id], 'filelists')
 
     def isnewest(self, pkg):
         newest = pkg.pkgtup in self.newestpkgtuplist




More information about the fedora-extras-commits mailing list