From bc7b8e2eb22a2c125735901505556d556986ae32 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 17 Jan 2025 09:47:02 +1000 Subject: [PATCH] lint_pkgbuild/arch: always perform some checks When using --ignorearch or options that imply it (e.g. --printsrcinfo), all checks of the arch array were skipped. Instead, perform all checks apart from confirming that the package can be built on that architecture. Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_pkgbuild/arch.sh.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in index ace2ee5c..8d4afee0 100644 --- a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in @@ -44,9 +44,11 @@ validate_arch() { ret=1 fi else - if ! in_array "$CARCH" "${a[@]}"; then - error "$(gettext "%s is not available for the '%s' architecture.")" "$n" "$CARCH" - ret=1 + if (( ! IGNOREARCH )); then + if ! in_array "$CARCH" "${a[@]}"; then + error "$(gettext "%s is not available for the '%s' architecture.")" "$n" "$CARCH" + ret=1 + fi fi fi @@ -68,10 +70,6 @@ validate_arch() { lint_arch() { local name list ret=0 - if (( IGNOREARCH )); then - return 0; - fi - validate_arch "$pkgbase" "${arch[@]}" if (( ret == 0 )); then