From 9577c07d867eb0887bd524dc1cdaaa188fbe82f3 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 3 Apr 2008 01:07:25 +1000 Subject: No error in makepkg when removing deps fails Catches error from when pacman is unable to remove dependencies after successfully building package and prints warning. Fixes FS#10039. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 762ae2be..6479a980 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -415,10 +415,17 @@ remove_deps() { done msg "Removing installed dependencies..." + local ret=0 if [ "$ASROOT" = "0" ]; then - sudo pacman $PACMAN_OPTS -Rns $deplist + sudo pacman $PACMAN_OPTS -Rns $deplist || ret=$? else - pacman $PACMAN_OPTS -Rns $deplist + pacman $PACMAN_OPTS -Rns $deplist || ret=$? + fi + + # Fixes FS#10039 - exit cleanly as package has built successfully + if [ $ret -ne 0 ]; then + warning "$(gettext "Failed to remove installed dependencies.")" + return 0 fi } -- cgit v1.2.3-24-g4f1b