From 35eeadbb2775e99deae72f484117062f783d6f7f Mon Sep 17 00:00:00 2001 From: Michael E Brown Date: Sun, 20 Jan 2008 13:59:55 -0600 Subject: add back in dropped '.' to tar cvf command that is causing root cache creation to fail. Add debug logging for running commands. --- docs/runtests.sh | 2 +- py/mock/plugins/root_cache.py | 2 +- py/mock/util.py | 1 + 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, -- cgit