mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05: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:
parent
0c3f502064
commit
ce9bb994f8
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user