mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-05 14:12:44 +00:00
abuild: fix provides and install_if in subpackages
we need to clear provides set in global scope before splitting the subpackages so the subpackage does not inherit main packages' provides. But at the same time, we must not clear the provides/install_if set in the splitfunction itself.
This commit is contained in:
parent
563409ed82
commit
0e58eeff80
16
abuild.in
16
abuild.in
@ -683,6 +683,15 @@ postcheck() {
|
||||
return 0
|
||||
}
|
||||
|
||||
pre_split() {
|
||||
if [ -z "$subpkgname" ]; then
|
||||
return 0
|
||||
fi
|
||||
# the subpackages should not inherit those form main package
|
||||
provides=""
|
||||
install_if=""
|
||||
}
|
||||
|
||||
prepare_subpackages() {
|
||||
local i
|
||||
cd "$startdir"
|
||||
@ -692,7 +701,7 @@ prepare_subpackages() {
|
||||
msg "Running split function $func..."
|
||||
local dir="$pkgbasedir/${i%:*}" name="${i%:*}"
|
||||
( subpkgdir="$dir" subpkgname="$name" \
|
||||
$0 $func prepare_package \
|
||||
$0 pre_split $func prepare_package \
|
||||
&& postcheck "$dir" "$name" ) || return 1
|
||||
done
|
||||
postcheck "$pkgdir" "$pkgname" || return 1
|
||||
@ -947,11 +956,6 @@ archcheck() {
|
||||
|
||||
prepare_package() {
|
||||
msg "Preparing ${subpkgname:+sub}package ${subpkgname:-$pkgname}..."
|
||||
if [ -n "$subpkgname" ]; then
|
||||
# the subpackages should not inherit those
|
||||
provides=""
|
||||
install_if=""
|
||||
fi
|
||||
stripbin
|
||||
prepare_metafiles \
|
||||
&& prepare_trace_rpaths \
|
||||
|
Loading…
Reference in New Issue
Block a user