[pacman-dev] [PATCH] makepkg: do not bail on failure to install built package

Allan McRae allan at archlinux.org
Sun Mar 29 02:52:51 EDT 2009


Fixes FS#13417.  Do no exit makepkg on a failure to install the
built package(s).  This allows clean-up to still occur.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/makepkg.sh.in |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ff2663b..716c5a9 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1071,10 +1071,16 @@ install_package() {
 		pkglist="${pkglist} $PKGDEST/${pkg}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
 	done
 
+	local ret=0
 	if [ "$ASROOT" -eq 0 ]; then
-		sudo pacman $PACMAN_OPTS -U ${pkglist} || exit $?
+		sudo pacman $PACMAN_OPTS -U ${pkglist} || ret=$?
 	else
-		pacman $PACMAN_OPTS -U ${pkglist} || exit $?
+		pacman $PACMAN_OPTS -U ${pkglist} || ret=$?
+	fi
+
+	if [ $ret -ne 0 ]; then
+		warning "$(gettext "Failed to install built package(s).")"
+		return 0
 	fi
 }
 
-- 
1.6.2.1



More information about the pacman-dev mailing list