blob: cb4c9f1c4b9438b3d50fa91afc67f18a5e77eed2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From b8b492924505656dd45f6e3720203e1f8a2dcfd4 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 10 Aug 2015 07:52:45 +0000
Subject: [PATCH] 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
---
abuild.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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
--
2.5.0
|