[pacman-dev] CVS update of pacman-lib (3 files)
Dan McGee
dan at archlinux.org
Sun Mar 25 13:37:43 EDT 2007
Date: Sunday, March 25, 2007 @ 13:37:43
Author: dan
Path: /home/cvs-pacman/pacman-lib
Modified: etc/pacman.d/.cvsignore (1.1 -> 1.2)
pactest/tests/scriptlet001.py (1.1 -> 1.2)
scripts/makepkg (1.64 -> 1.65)
* Fix bug where 'makepkg -L' doesn't stop on build failure.
Andrew Fyfe <andrew at neptune-one.net>
* Add testing to etc/pacman.d/.cvsignore
* Fix scriptlet001.py test to work during 'make check'.
-------------------------------+
etc/pacman.d/.cvsignore | 1 +
pactest/tests/scriptlet001.py | 3 ++-
scripts/makepkg | 21 ++++++++-------------
3 files changed, 11 insertions(+), 14 deletions(-)
Index: pacman-lib/etc/pacman.d/.cvsignore
diff -u pacman-lib/etc/pacman.d/.cvsignore:1.1 pacman-lib/etc/pacman.d/.cvsignore:1.2
--- pacman-lib/etc/pacman.d/.cvsignore:1.1 Tue Jan 16 22:40:09 2007
+++ pacman-lib/etc/pacman.d/.cvsignore Sun Mar 25 13:37:42 2007
@@ -6,3 +6,4 @@
mirrorlist
release
unstable
+testing
Index: pacman-lib/pactest/tests/scriptlet001.py
diff -u pacman-lib/pactest/tests/scriptlet001.py:1.1 pacman-lib/pactest/tests/scriptlet001.py:1.2
--- pacman-lib/pactest/tests/scriptlet001.py:1.1 Thu Mar 22 04:30:18 2007
+++ pacman-lib/pactest/tests/scriptlet001.py Sun Mar 25 13:37:43 2007
@@ -8,7 +8,8 @@
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")
Index: pacman-lib/scripts/makepkg
diff -u pacman-lib/scripts/makepkg:1.64 pacman-lib/scripts/makepkg:1.65
--- pacman-lib/scripts/makepkg:1.64 Sat Mar 24 13:11:18 2007
+++ pacman-lib/scripts/makepkg Sun Mar 25 13:37:43 2007
@@ -883,6 +883,7 @@
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 @@
#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
More information about the pacman-dev
mailing list