From 1fa3ad8e1c8a81f04904d0aed6401955809d390f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 15 Apr 2019 10:16:28 +0200 Subject: bin/build-packages: we're not interested in what this cpu /can/ do, but what architecture the installed packages actually are --- bin/build-packages | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'bin/build-packages') 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 -- cgit v1.2.3-70-g09d2