diff options
author | Clark Williams <williams@redhat.com> | 2010-07-14 13:16:17 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-07-27 13:58:23 -0500 |
commit | 077a09ea6bb5a0e2ac0861210f6df528f531f6f7 (patch) | |
tree | 8b625fb7c5d9790386bcadcd91911d8a50e7a83b | |
parent | 4fbf9c511c34ac65d5603aeffb8cfb0cbf7e7940 (diff) | |
download | mock-077a09ea6bb5a0e2ac0861210f6df528f531f6f7.tar.gz mock-077a09ea6bb5a0e2ac0861210f6df528f531f6f7.tar.xz mock-077a09ea6bb5a0e2ac0861210f6df528f531f6f7.zip |
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 <williams@redhat.com>
-rw-r--r-- | py/mock/plugins/yum_cache.py | 14 |
1 files 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() |