abuild: fix dep-scanning when sub and main pkg's arch differs
Force dependency scanning when main pkg has noarch but subpackage overrides it. We need to save the arch setting set in split func for later if it differs from main pkg's arch in a temp file because the splitfunc runs in a subprocess. fixes #4491
This commit is contained in:
parent
3020891009
commit
b8b4929245
|
@ -690,6 +690,7 @@ pre_split() {
|
||||||
# the subpackages should not inherit those form main package
|
# the subpackages should not inherit those form main package
|
||||||
provides=""
|
provides=""
|
||||||
install_if=""
|
install_if=""
|
||||||
|
apkbuild_arch="$arch"
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_subpackages() {
|
prepare_subpackages() {
|
||||||
|
@ -796,6 +797,11 @@ prepare_metafiles() {
|
||||||
# parch="noarch"
|
# parch="noarch"
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
# save arch incase subpackages set it different than main pkg
|
||||||
|
if [ "${apkbuild_arch:-$arch}" != "$arch" ]; then
|
||||||
|
echo "$arch" > "$controldir"/.arch
|
||||||
|
fi
|
||||||
|
|
||||||
echo "# Generated by $(basename $0) $program_version" >"$pkginfo"
|
echo "# Generated by $(basename $0) $program_version" >"$pkginfo"
|
||||||
if [ -n "$FAKEROOTKEY" ]; then
|
if [ -n "$FAKEROOTKEY" ]; then
|
||||||
echo "# using $($FAKEROOT -v)" >> "$pkginfo"
|
echo "# using $($FAKEROOT -v)" >> "$pkginfo"
|
||||||
|
@ -1115,7 +1121,7 @@ scan_shared_objects() {
|
||||||
local name="$1" controldir="$2" datadir="$3"
|
local name="$1" controldir="$2" datadir="$3"
|
||||||
local opt= i=
|
local opt= i=
|
||||||
|
|
||||||
if [ "$arch" = "noarch" ]; then
|
if [ "$arch" = "noarch" ] && ! [ -e "$controldir"/.arch ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue