diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-05 22:14:24 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-05 22:14:24 -0600 |
commit | fc3a2ad3016ab8a5c20d71cbd34e9b40f056f7f5 (patch) | |
tree | c357957d75be6a05592542731312452a3094c9b2 | |
parent | a87d6c292393a1f99cbb20d5824a716e72c94df2 (diff) | |
download | mock-fc3a2ad3016ab8a5c20d71cbd34e9b40f056f7f5.tar.gz mock-fc3a2ad3016ab8a5c20d71cbd34e9b40f056f7f5.tar.xz mock-fc3a2ad3016ab8a5c20d71cbd34e9b40f056f7f5.zip |
fixup error where var/cache/yum in buildroot disappears due to clean.
-rw-r--r-- | py/mock/plugins/yum_cache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mock/plugins/yum_cache.py b/py/mock/plugins/yum_cache.py index afc778e..ed73a9d 100644 --- a/py/mock/plugins/yum_cache.py +++ b/py/mock/plugins/yum_cache.py @@ -38,7 +38,6 @@ class YumCache(object): rootObj.addHook("preinit", self._yumCachePreInitHook) rootObj.umountCmds.append('umount -n %s/var/cache/yum' % rootObj.rootdir) rootObj.mountCmds.append('mount -n --bind %s %s/var/cache/yum' % (self.yumSharedCachePath, rootObj.rootdir)) - mock.util.mkdirIfAbsent(os.path.join(self.rootdir, 'var/cache/yum')) mock.util.mkdirIfAbsent(self.yumSharedCachePath) self.yumCacheLock = open(os.path.join(self.yumSharedCachePath, "yumcache.lock"), "a+") @@ -66,6 +65,7 @@ class YumCache(object): @traceLog(moduleLog) def _yumCachePreInitHook(self): moduleLog.info("enabled yum cache") + mock.util.mkdirIfAbsent(os.path.join(self.rootdir, 'var/cache/yum')) # lock so others dont accidentally use yum cache while we operate on it. self._yumCachePreYumHook() |