summaryrefslogtreecommitdiffstats
path: root/py/mock/plugins/root_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/mock/plugins/root_cache.py')
-rw-r--r--py/mock/plugins/root_cache.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/py/mock/plugins/root_cache.py b/py/mock/plugins/root_cache.py
index bfcec31..7bae43f 100644
--- a/py/mock/plugins/root_cache.py
+++ b/py/mock/plugins/root_cache.py
@@ -74,7 +74,10 @@ class RootCache(object):
if os.path.exists(self.rootCacheFile) and self.rootObj.chrootWasCleaned:
self.state("unpacking root cache")
self._rootCacheLock()
- mock.util.do("tar xzf %s -C %s" % (self.rootCacheFile, self.rootObj.makeChrootPath()))
+ mock.util.do(
+ ["tar", "xzf", self.rootCacheFile, "-C", self.rootObj.makeChrootPath()],
+ shell=False
+ )
self._rootCacheUnlock()
self.chroot_setup_cmd = "update"
self.rootObj.chrootWasCleaned = False
@@ -85,6 +88,9 @@ class RootCache(object):
if self.rootObj.chrootWasCleaned:
self.state("creating cache")
self._rootCacheLock(shared=0)
- mock.util.do("tar czf %s -C %s ." % (self.rootCacheFile, self.rootObj.makeChrootPath()))
+ mock.util.do(
+ ["tar", "czf", self.rootCacheFile, "-C", self.rootObj.makeChrootPath()],
+ shell=False
+ )
self._rootCacheUnlock()