[Yum-devel] [PATCH] Don't call repo.doSetup() if we've already setup the repos. BZ 717163.

James Antill james at and.org
Tue Jun 28 20:00:33 UTC 2011


 Test: yum in @core == has    setup.
       yum rm @core == hasn't setup.
---
 yum/__init__.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index 92f25d4..2dce3bf 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -792,7 +792,9 @@ class YumBase(depsolve.Depsolve):
         self.verbose_logger.log(logginglevels.DEBUG_4,
                                 _('Getting group metadata'))
         reposWithGroups = []
-        self.repos.doSetup()
+        #  Need to make sure the groups data is ready to read. Really we'd want
+        # to add groups to the mdpolicy list of the repo. but we don't atm.
+        self.pkgSack
         for repo in self.repos.listGroupsEnabled():
             if repo.groups_added: # already added the groups from this repo
                 reposWithGroups.append(repo)
-- 
1.7.5.4



More information about the Yum-devel mailing list