summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Staniewski <cedric@gmx.ca>2009-11-10 20:47:09 +0100
committerDan McGee <dan@archlinux.org>2009-11-15 19:19:11 -0600
commit77e84bea71e3dfe87a8009e7e7a913d1a12b7585 (patch)
tree17c7c94b05cad105c3282aa50d6763a7fd75fadc
parent0199a7ee717f0848e336fda8dc1f5b9364ce3478 (diff)
downloadpacman-77e84bea71e3dfe87a8009e7e7a913d1a12b7585.tar.xz
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 <shiningxc@gmail.com> for finding this solution. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in7
1 files 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
}