summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael E Brown <michael_e_brown@dell.com>2008-01-20 13:59:55 -0600
committerMichael E Brown <michael_e_brown@dell.com>2008-01-20 13:59:55 -0600
commit35eeadbb2775e99deae72f484117062f783d6f7f (patch)
treefbd1d3c724be0334bafb0859fd7d6b5ca4f8bdf8
parent5aaa59800cae18440c1ba6caca5800e45b3ff5fa (diff)
downloadmock-35eeadbb2775e99deae72f484117062f783d6f7f.tar.gz
mock-35eeadbb2775e99deae72f484117062f783d6f7f.tar.xz
mock-35eeadbb2775e99deae72f484117062f783d6f7f.zip
add back in dropped '.' to tar cvf command that is causing root cache creation to fail. Add debug logging for running commands.
-rwxr-xr-xdocs/runtests.sh2
-rw-r--r--py/mock/plugins/root_cache.py2
-rw-r--r--py/mock/util.py1
3 files changed, 3 insertions, 2 deletions
diff --git a/docs/runtests.sh b/docs/runtests.sh
index 5897cc3..991477a 100755
--- a/docs/runtests.sh
+++ b/docs/runtests.sh
@@ -33,7 +33,7 @@ outdir=${CURDIR}/mock-unit-test
MOCKCMD="sudo ./py/mock.py --resultdir=$outdir --uniqueext=$uniqueext -r $testConfig $MOCK_EXTRA_ARGS"
CHROOT=/var/lib/mock/${testConfig}-$uniqueext/root
-trap '$MOCKCMD --clean' INT HUP QUIT EXIT TERM
+#trap '$MOCKCMD --clean' INT HUP QUIT EXIT TERM
# clear out root cache so we get at least run without root cache present
#sudo rm -rf /var/lib/mock/cache/${testConfig}/root_cache
diff --git a/py/mock/plugins/root_cache.py b/py/mock/plugins/root_cache.py
index 7bae43f..9cb0a13 100644
--- a/py/mock/plugins/root_cache.py
+++ b/py/mock/plugins/root_cache.py
@@ -89,7 +89,7 @@ class RootCache(object):
self.state("creating cache")
self._rootCacheLock(shared=0)
mock.util.do(
- ["tar", "czf", self.rootCacheFile, "-C", self.rootObj.makeChrootPath()],
+ ["tar", "czf", self.rootCacheFile, "-C", self.rootObj.makeChrootPath(), "."],
shell=False
)
self._rootCacheUnlock()
diff --git a/py/mock/util.py b/py/mock/util.py
index 895414e..f93f98b 100644
--- a/py/mock/util.py
+++ b/py/mock/util.py
@@ -253,6 +253,7 @@ def do(command, shell=False, chrootPath=None, timeout=0, raiseExc=True, returnOu
preexec = ChildPreExec(personality, chrootPath, uid, gid)
try:
child = None
+ logger.debug("Executing command: %s" % command)
child = subprocess.Popen(
command,
shell=shell,