summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-08-10 07:52:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-08-10 07:58:21 +0000
commitb8b492924505656dd45f6e3720203e1f8a2dcfd4 (patch)
tree50b05e96f4d794ed1b8a19a70a70305046b56148 /abuild.in
parent3020891009a6024b46bc779568644ce16605bda9 (diff)
downloadabuild-b8b492924505656dd45f6e3720203e1f8a2dcfd4.tar.bz2
abuild-b8b492924505656dd45f6e3720203e1f8a2dcfd4.tar.xz
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
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 41822af..01b4b62 100644
--- a/abuild.in
+++ b/abuild.in
@@ -690,6 +690,7 @@ pre_split() {
# the subpackages should not inherit those form main package
provides=""
install_if=""
+ apkbuild_arch="$arch"
}
prepare_subpackages() {
@@ -796,6 +797,11 @@ prepare_metafiles() {
# parch="noarch"
# 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"
if [ -n "$FAKEROOTKEY" ]; then
echo "# using $($FAKEROOT -v)" >> "$pkginfo"
@@ -1115,7 +1121,7 @@ scan_shared_objects() {
local name="$1" controldir="$2" datadir="$3"
local opt= i=
- if [ "$arch" = "noarch" ]; then
+ if [ "$arch" = "noarch" ] && ! [ -e "$controldir"/.arch ]; then
return 0
fi