summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--py/mock/plugins/yum_cache.py2
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()