diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-11 14:56:36 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-11 14:56:36 -0600 |
commit | 08decfbb63aad0d87ed69dc9f4127bf3ca5a35be (patch) | |
tree | b9179a670f0817e9f82e3524d0b360b1a19c9e4e | |
parent | ebcf490ed2a9ec28634b86a18616a9796fcd22fa (diff) | |
parent | ccad75c34af7cae8aee0159fe734a945f0c3861c (diff) | |
download | mock-08decfbb63aad0d87ed69dc9f4127bf3ca5a35be.tar.gz mock-08decfbb63aad0d87ed69dc9f4127bf3ca5a35be.tar.xz mock-08decfbb63aad0d87ed69dc9f4127bf3ca5a35be.zip |
Merge branch 'master' of ssh://mebrown@git.fedoraproject.org/git/hosted/mock
-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 |