extras-repoclosure rc-modified,1.30,1.31

Michael Schwendt mschwendt at fedoraproject.org
Mon Sep 7 09:28:53 UTC 2009


Author: mschwendt

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

Modified Files:
	rc-modified 
Log Message:
support Yum 3.2.24 API changes related to arch list - copied from yum-utils repoclosure


Index: rc-modified
===================================================================
RCS file: /cvs/fedora/extras-repoclosure/rc-modified,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- rc-modified	11 Aug 2009 07:35:28 -0000	1.30
+++ rc-modified	7 Sep 2009 09:28:52 -0000	1.31
@@ -70,7 +70,10 @@
     def __init__(self, arch = None, config = "/etc/yum.conf"):
         yum.YumBase.__init__(self)
 
-        self.arch = arch
+        if yum.__version__ < '3.2.24':
+            self.arch = arch
+        else:
+            self._rc_arches = arch
         if yum.__version__ < '3.0':  # TODO: check
             self.doConfigSetup(fn = config)
         else:
@@ -103,7 +106,18 @@
     
     def readMetadata(self):
         self.doRepoSetup()
-        self.doSackSetup(rpmUtils.arch.getArchList(self.arch))
+
+        if yum.__version__ < '3.2.24':
+            self.doSackSetup(rpmUtils.arch.getArchList(self.arch))
+        else:
+            archs = []
+            if not self._rc_arches:
+                archs.extend(self.arch.archlist)
+            else:
+                for arch in self._rc_arches:
+                    archs.extend(self.arch.get_arch_list(arch))
+            self.doSackSetup(archs)
+
         for repo in self.repos.listEnabled():
             try:  # TODO: when exactly did this change from "with=" to "mdtype="?
                 self.repos.populateSack(which=[repo.id], mdtype='filelists')




More information about the scm-commits mailing list