[yum-cvs] yum/yum __init__.py,1.308,1.309

Tim Lauridsen timlau at linux.duke.edu
Mon Mar 19 10:43:13 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv8995/yum

Modified Files:
	__init__.py 
Log Message:
make doRepoSetup (__getRepos) only add the repos once.
So dont get 'Repository xxxx is listed more than once in the configuration'
in yum api programs like yum-utils, yumex etc, calling doRepoSetup()
because self.repos has been accessed before.

Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -r1.308 -r1.309
--- __init__.py	16 Mar 2007 17:36:08 -0000	1.308
+++ __init__.py	19 Mar 2007 10:43:11 -0000	1.309
@@ -310,17 +310,16 @@
            the basics of the repository"""
         
         if not self._repos:
-            self._repos = RepoStorage()
+            self._repos = RepoStorage()       
+            # Get our list of repo objects from conf, add them to the repos collection        
+            for r in self.conf._reposlist:
+                try:
+                    self._repos.add(r)
+                except Errors.RepoError, e: 
+                    self.logger.warning(e)
+                    continue
         elif not doSetup:
             return self._repos
-        
-        # Get our list of repo objects from conf, add them to the repos collection        
-        for r in self.conf._reposlist:
-            try:
-                self.repos.add(r)
-            except Errors.RepoError, e: 
-                self.logger.warning(e)
-                continue
 
         self.plugins.run('prereposetup')
         




More information about the Yum-cvs-commits mailing list