From 9d9c12e4e2dc92dfb6582ea7f79087e382348e71 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 1 May 2012 10:59:03 +1000 Subject: 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 --- scripts/makepkg.sh.in | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') 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 -- cgit v1.2.3-70-g09d2