diff options
author | Clark Williams <williams@redhat.com> | 2010-07-14 13:16:17 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-07-31 14:08:26 -0500 |
commit | f53d11aa1b63c4fe13c522a203c166f473a8d690 (patch) | |
tree | 686e883eb0d6910ab67cb5ea77630723a4777c36 | |
parent | 335388a9bed7adf39aeb82b0a340acb193a92a64 (diff) | |
download | mock-f53d11aa1b63c4fe13c522a203c166f473a8d690.tar.gz mock-f53d11aa1b63c4fe13c522a203c166f473a8d690.tar.xz mock-f53d11aa1b63c4fe13c522a203c166f473a8d690.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 d2460a4..3899855 100644 --- a/py/mock/plugins/yum_cache.py +++ b/py/mock/plugins/yum_cache.py @@ -90,13 +90,13 @@ class YumCache(object): os.unlink(fullPath) continue - # so 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() |