abuild: run subpackage split functions in a subshell

so subfunctions don't overwrite the global variables like depends, pkgdesc etc.
This commit is contained in:
Natanael Copa 2013-04-23 06:08:52 +00:00
parent 8b3ecdf1f4
commit 65edee22f2

View File

@ -659,9 +659,9 @@ prepare_subpackages() {
# call abuild recursively, setting subpkg{dir,name}
msg "Running split function $func..."
local dir="$pkgbasedir/${i%:*}" name="${i%:*}"
subpkgdir="$dir" subpkgname="$name" \
$0 $func prepare_package || return 1
postcheck "$dir" "$name" || return 1
( subpkgdir="$dir" subpkgname="$name" \
$0 $func prepare_package \
&& postcheck "$dir" "$name" ) || return 1
done
postcheck "$pkgdir" "$pkgname" || return 1
# post check for /usr/share/locale