Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2023-06-15 11:05:12 +0200
committerChristian Heusel <christian@heusel.eu>2023-07-05 18:17:32 +0200
commit720b7c9b0524fd2dfb8b811985b55237ffe2de69 (patch)
tree0c9b63b915b9440e9d82324c185ba2af21ad07a4 /src/lib
parent0ea7e9e0e586d092bcc991789dbf23b5981204a3 (diff)
chore(build): skip invalid architectures on autodetection
This is done so that pkgctl can be better used to build aur packages which can have arch=(...) settings for which we do not have a clean chroot builder. Signed-off-by: Christian Heusel <christian@heusel.eu>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/build/build.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh
index aa2293c..ecdeaad 100644
--- a/src/lib/build/build.sh
+++ b/src/lib/build/build.sh
@@ -129,7 +129,7 @@ pkgctl_build() {
local WORKER_SLOT=
# variables
- local path pkgbase pkgrepo source
+ local loop_arch path pkgbase pkgrepo source
while (( $# )); do
case $1 in
@@ -318,7 +318,13 @@ pkgctl_build() {
if in_array any "${arch[@]}"; then
BUILD_ARCH=("${_arch[0]}")
else
- BUILD_ARCH+=("${arch[@]}")
+ for loop_arch in "${arch[@]}"; do
+ if in_array "${loop_arch}" "${_arch[@]}"; then
+ BUILD_ARCH+=("$loop_arch")
+ else
+ warning 'invalid architecture, not building for: %s' "${loop_arch}"
+ fi
+ done
fi
fi