mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-13 18:50:31 +00:00
abuild: fix runpart
we need to run the function for runpart in the same shell, otherwise we will lose the global variables set in the split functions.
This commit is contained in:
parent
9c1595dc42
commit
3b61bfb644
29
abuild.in
29
abuild.in
@ -566,9 +566,9 @@ update_config_guess() {
|
||||
runpart() {
|
||||
local part=$1
|
||||
[ -n "$DEBUG" ] && msg "$part"
|
||||
abuild_function=$part "$abuild_path" \
|
||||
$color_opt $nodeps $force $forceroot $keep $quiet \
|
||||
$install_deps $recursive $upgrade || die "$part failed"
|
||||
trap "die '$part failed'" EXIT
|
||||
$part
|
||||
trap - EXIT
|
||||
}
|
||||
|
||||
# override those in your build script
|
||||
@ -2340,22 +2340,15 @@ controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
|
||||
|
||||
trap 'die "Aborted by user"' INT
|
||||
|
||||
if [ "$abuild_function" ]; then
|
||||
_function=$abuild_function
|
||||
abuild_function=
|
||||
$_function
|
||||
[ -z "$subpkgdir" ] && set_xterm_title "abuild${CROSS_COMPILE+-$CARCH}: $pkgname"
|
||||
|
||||
else
|
||||
[ -z "$subpkgdir" ] && set_xterm_title "abuild${CROSS_COMPILE+-$CARCH}: $pkgname"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
set all
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
runpart $1
|
||||
shift
|
||||
done
|
||||
if [ -z "$1" ]; then
|
||||
set all
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
runpart $1
|
||||
shift
|
||||
done
|
||||
|
||||
cleanup
|
||||
|
Loading…
Reference in New Issue
Block a user