makepkg: unset errexit when sourcing /etc/profile
This is a fix for a bash3 specific bug, where a file sourced by /etc/profile would exit non-zero and make its way back up to makepkg, forcing it to exit after package installation. Along with unsetting the ERR handler, temporarily unset errexit to avoid this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
7f1235ccbc
commit
c736a12e86
1 changed files with 3 additions and 1 deletions
|
@ -474,11 +474,13 @@ handle_deps() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# we might need the new system environment
|
# we might need the new system environment
|
||||||
# avoid triggering the ERR trap
|
# avoid triggering the ERR trap and exiting
|
||||||
|
set +e
|
||||||
local restoretrap=$(trap -p ERR)
|
local restoretrap=$(trap -p ERR)
|
||||||
trap - ERR
|
trap - ERR
|
||||||
source /etc/profile &>/dev/null
|
source /etc/profile &>/dev/null
|
||||||
eval $restoretrap
|
eval $restoretrap
|
||||||
|
set -e
|
||||||
|
|
||||||
return $R_DEPS_SATISFIED
|
return $R_DEPS_SATISFIED
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue