summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-07-31 08:13:14 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-07-31 08:13:14 -0400
commit2a93140e6f9ea5679e4cf8241c193f31bcb87f9b (patch)
treedd6e9ae4cd9a04835904b5d86fe71f5f07780ec1 /src/sbin
parenta4c44bf64c95aa732a1f21c9960f73e28a445a1c (diff)
downloadbcfg2-2a93140e6f9ea5679e4cf8241c193f31bcb87f9b.tar.gz
bcfg2-2a93140e6f9ea5679e4cf8241c193f31bcb87f9b.tar.bz2
bcfg2-2a93140e6f9ea5679e4cf8241c193f31bcb87f9b.zip
bcfg2-yum-helper: populate group cache during makecache
Fixes #128
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-yum-helper4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-yum-helper b/src/sbin/bcfg2-yum-helper
index 59b9f5e78..b8c99953d 100755
--- a/src/sbin/bcfg2-yum-helper
+++ b/src/sbin/bcfg2-yum-helper
@@ -255,6 +255,10 @@ class CacheManager(YumHelper):
for repo in self.yumbase.repos.listEnabled():
# this populates the cache as a side effect
repo.repoXML # pylint: disable=W0104
+ try:
+ repo.getGroups()
+ except yum.Errors.RepoMDError:
+ pass # this repo has no groups
self.yumbase.repos.populateSack(mdtype='metadata', cacheonly=1)
self.yumbase.repos.populateSack(mdtype='filelists', cacheonly=1)
self.yumbase.repos.populateSack(mdtype='otherdata', cacheonly=1)