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>
This commit is contained in:
parent
0199a7ee71
commit
77e84bea71
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue