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
---
scripts/makepkg.sh.in | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 92b0454..185f606 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
}
--
1.6.5.2