diff options
-rw-r--r-- | etc/pacman.d/.cvsignore | 1 | ||||
-rw-r--r-- | pactest/tests/scriptlet001.py | 3 | ||||
-rwxr-xr-x | scripts/makepkg | 21 |
3 files changed, 11 insertions, 14 deletions
diff --git a/etc/pacman.d/.cvsignore b/etc/pacman.d/.cvsignore index 0ca92019..32b2d700 100644 --- a/etc/pacman.d/.cvsignore +++ b/etc/pacman.d/.cvsignore @@ -6,3 +6,4 @@ extra mirrorlist release unstable +testing diff --git a/pactest/tests/scriptlet001.py b/pactest/tests/scriptlet001.py index a749a114..73bb7691 100644 --- a/pactest/tests/scriptlet001.py +++ b/pactest/tests/scriptlet001.py @@ -8,7 +8,8 @@ p1.install['pre_install'] = "ls /etc"; p1.install['post_install'] = "ls /etc"; self.addpkg(p1) -self.args = "-U %s" % p1.filename() +# --debug is necessary to check PACMAN_OUTPUT +self.args = "--debug -U %s" % p1.filename() self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_OUTPUT=pre_install") diff --git a/scripts/makepkg b/scripts/makepkg index 426b0e95..5afb285c 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -883,6 +883,7 @@ else echo $SHELLOPTS | grep errexit 2>&1 >/dev/null set_e=$? + ret=0 if [ "$LOGGING" = "1" ]; then BUILDLOG="${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log" if [ -f "$BUILDLOG" ]; then @@ -899,24 +900,18 @@ else #use 'errexit' to bail on syntax error [ $set_e -eq 1 ] && set -e - build 2>&1 | tee "$BUILDLOG" + build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]} [ $set_e -eq 1 ] && set +e - - if [ ${PIPESTATUS[0]} -gt 0 ]; then - error "Build Failed. Aborting..." - removedeps - exit 2 - fi else #use 'errexit' to bail on syntax error [ $set_e -eq 1 ] && set -e - build 2>&1 + build 2>&1 || ret=$? [ $set_e -eq 1 ] && set +e - if [ $? -gt 0 ]; then - error "Build Failed. Aborting..." - removedeps - exit 2 - fi + fi + if [ $ret -gt 0 ]; then + error "Build Failed. Aborting..." + removedeps + exit 2 fi fi |