Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-packages12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/build-packages b/bin/build-packages
index a6f98d3..79ef001 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -489,12 +489,18 @@ while [ "${count}" -ne 0 ] && \
>&2 echo 'Because straw :without_systemd_nspawn: is active, I will abort.'
exit 2
fi
- if uname -m | \
- grep -qxF 'x86_64'; then
+ # we're not interested in what this cpu /can/ do, but what
+ # architecture the installed packages actually are
+ if ! pacman -Qi pacman | \
+ sed 's/^Architecture\s*:\s*//;t;d' | \
+ grep -qxF "${arch}"; then
>&2 echo 'straw :without_systemd_nspawn: requires running build-packages on the'
>&2 echo 'architecture for which the package should be built.'
>&2 printf '"%s" != "%s"\n' \
- "$(uname -m)" \
+ "$(
+ pacman -Qi pacman | \
+ sed 's/^Architecture\s*:\s*//;t;d'
+ )" \
"${arch}"
exit 2
fi