summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-05-01 10:59:03 +1000
committerDan McGee <dan@archlinux.org>2012-04-30 20:48:59 -0500
commit9d9c12e4e2dc92dfb6582ea7f79087e382348e71 (patch)
treee939e42e849a437dcb1f974c8c200ae4633994b6 /scripts
parent92e20b508d302a1d91f9b2a6836ac1cd4453c87c (diff)
downloadpacman-9d9c12e4e2dc92dfb6582ea7f79087e382348e71.tar.xz
makepkg: fix package arch detection
get_pkg_arch checked for the arch variable being overridden in the package_$1() function when used with a package as a parameter. However, when there was no override, it did not fall back to the global value. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d1251b84..d36dbd63 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -274,6 +274,7 @@ get_pkg_arch() {
else
local arch_override
eval $(declare -f package_$1 | sed -n 's/\(^[[:space:]]*arch=\)/arch_override=/p')
+ (( ${#arch_override[@]} == 0 )) && arch_override=("${arch[@]}")
if [[ $arch_override = "any" ]]; then
printf "%s\n" "any"
else