summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-06-06 04:59:10 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-06-06 21:40:30 -0500
commitb305e062d8fd978d18b11f7acc383f14b9f704ce (patch)
treef5cf3612d363a82e235e5aa5cfed389b11475479 /abuild.in
parent5453a857ad46d5dd80e843f1efa53ae3bd886a16 (diff)
downloadabuild-b305e062d8fd978d18b11f7acc383f14b9f704ce.tar.gz
abuild-b305e062d8fd978d18b11f7acc383f14b9f704ce.tar.bz2
abuild-b305e062d8fd978d18b11f7acc383f14b9f704ce.tar.xz
abuild-b305e062d8fd978d18b11f7acc383f14b9f704ce.zip
abuild: Use $pkgarch instead of $arch for dbg test
$arch may be set to a list, for example, "noarch !armv7". $pkgarch is always the "effective" arch for a package, which will evaluate to "noarch" if the package is a noarch package. Closes: #13
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/abuild.in b/abuild.in
index 1d5923a..69c803b 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2597,8 +2597,13 @@ fi
# for recursive action
export REPODEST SRCDEST
+if [ -z "$pkgarch" ]; then
+ pkgarch=$CARCH
+ list_has noarch $arch && pkgarch=noarch
+fi
+
# add dbg subpackage if its enabled globally
-if [ -n "$DEFAULT_DBG" ] && ! subpackage_types_has "dbg" && ! options_has "!dbg" && [ "$arch" != "noarch" ]; then
+if [ -n "$DEFAULT_DBG" ] && ! subpackage_types_has "dbg" && ! options_has "!dbg" && [ "$pkgarch" != "noarch" ]; then
subpackages="$pkgname-dbg $subpackages"
fi
@@ -2621,10 +2626,6 @@ else
fi
apkbuild_arch="$arch"
pkgdir="$pkgbasedir/$pkgname"
-if [ -z "$pkgarch" ]; then
- pkgarch=$CARCH
- list_has noarch $arch && pkgarch=noarch
-fi
controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
trap 'die "Aborted by user"' INT