diff options
-rwxr-xr-x | docs/releasetests.sh | 13 | ||||
-rw-r--r-- | py/mock/backend.py | 17 |
2 files changed, 19 insertions, 11 deletions
diff --git a/docs/releasetests.sh b/docs/releasetests.sh index 0d2caa5..ca5c0f7 100755 --- a/docs/releasetests.sh +++ b/docs/releasetests.sh @@ -53,6 +53,19 @@ if [ ! -e $CHROOT/usr/include/python* ]; then fi # +# Test that chroot return code is properly passed up +# +set +e +time $MOCKCMD --offline --chroot 'bash -c "exit 5"' +if [ $? -ne 5 ]; then + echo "'mock --chroot' return code not properly passed back." + exit 1 +fi +set -e + + + +# # Test offline build # time $MOCKCMD --offline --rebuild mock-*.src.rpm diff --git a/py/mock/backend.py b/py/mock/backend.py index 98c1a52..c18026f 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -307,17 +307,12 @@ class Root(object): def installSrpmDeps(self, *srpms): """figure out deps from srpm. call yum to install them""" arg_string = self.preExistingDeps - self.uidManager.dropPrivsTemp() - try: - for hdr in mock.util.yieldSrpmHeaders(srpms, plainRpmOk=1): - # get text buildreqs - a = mock.util.requiresTextFromHdr(hdr) - b = mock.util.getAddtlReqs(hdr, self.more_buildreqs) - for item in mock.util.uniqReqs(a, b): - arg_string = arg_string + " '%s'" % item - - finally: - self.uidManager.restorePrivs() + for hdr in mock.util.yieldSrpmHeaders(srpms, plainRpmOk=1): + # get text buildreqs + a = mock.util.requiresTextFromHdr(hdr) + b = mock.util.getAddtlReqs(hdr, self.more_buildreqs) + for item in mock.util.uniqReqs(a, b): + arg_string = arg_string + " '%s'" % item # everything exists, okay, install them all. # pass build reqs (as strings) to installer |