1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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>
(cherry picked from commit 77e84bea71)

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Cedric Staniewski 2009-11-10 20:47:09 +01:00 committed by Dan McGee
parent 0c3f502064
commit ce9bb994f8

View File

@ -385,10 +385,11 @@ handledeps() {
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
}