From 077a09ea6bb5a0e2ac0861210f6df528f531f6f7 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Wed, 14 Jul 2010 13:16:17 -0500 Subject: moved rpmdb clean block so that it works with --offline previous fix for rpmdb issues was under a "if online:" block. Move it out so rpmdb cleanup occurs in both cases. Signed-off-by: Clark Williams --- py/mock/plugins/yum_cache.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/py/mock/plugins/yum_cache.py b/py/mock/plugins/yum_cache.py index e2a7aa3..0ced767 100644 --- a/py/mock/plugins/yum_cache.py +++ b/py/mock/plugins/yum_cache.py @@ -89,13 +89,13 @@ class YumCache(object): os.unlink(fullPath) continue - # yum made an rpmdb cache dir in $cachedir/installed for a while; - # things can go wrong in a specific mock case if this happened. - # So - just nuke the dir and all that's in it. - if os.path.exists(self.yumSharedCachePath + '/installed'): - for fn in glob.glob(self.yumSharedCachePath + '/installed/*'): - os.unlink(fn) - os.rmdir(self.yumSharedCachePath + '/installed') + # yum made an rpmdb cache dir in $cachedir/installed for a while; + # things can go wrong in a specific mock case if this happened. + # So - just nuke the dir and all that's in it. + if os.path.exists(self.yumSharedCachePath + '/installed'): + for fn in glob.glob(self.yumSharedCachePath + '/installed/*'): + os.unlink(fn) + os.rmdir(self.yumSharedCachePath + '/installed') self._yumCachePostYumHook() -- cgit