From 77e84bea71e3dfe87a8009e7e7a913d1a12b7585 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski Date: Tue, 10 Nov 2009 20:47:09 +0100 Subject: makepkg: fix abortion after sourcing /etc/profile The source command triggers / might trigger the ERR trap which makes makepkg abort right after a successful installation of missing dependencies. Thanks to Xavier Chantry for finding this solution. Signed-off-by: Cedric Staniewski Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 25fb8d93..628d5c36 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -371,10 +371,11 @@ handle_deps() { fi # we might need the new system environment - # set -e can cause problems during sourcing profile scripts - set +e + # avoid triggering the ERR trap + local restoretrap=$(trap -p ERR) + trap - ERR source /etc/profile &>/dev/null - set -e + eval $restoretrap return $R_DEPS_SATISFIED } -- cgit v1.2.3-70-g09d2