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>
This commit is contained in:
parent
92e20b508d
commit
9d9c12e4e2
1 changed files with 1 additions and 0 deletions
|
@ -274,6 +274,7 @@ get_pkg_arch() {
|
||||||
else
|
else
|
||||||
local arch_override
|
local arch_override
|
||||||
eval $(declare -f package_$1 | sed -n 's/\(^[[:space:]]*arch=\)/arch_override=/p')
|
eval $(declare -f package_$1 | sed -n 's/\(^[[:space:]]*arch=\)/arch_override=/p')
|
||||||
|
(( ${#arch_override[@]} == 0 )) && arch_override=("${arch[@]}")
|
||||||
if [[ $arch_override = "any" ]]; then
|
if [[ $arch_override = "any" ]]; then
|
||||||
printf "%s\n" "any"
|
printf "%s\n" "any"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue