diff options
author | Erich Eckner <git@eckner.net> | 2019-04-15 10:16:28 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-04-15 10:16:28 +0200 |
commit | 1fa3ad8e1c8a81f04904d0aed6401955809d390f (patch) | |
tree | edd60a86eb93c642f60cd4b57ac59cccfc2f7099 /bin/build-packages | |
parent | 0831684fba450ec59da9a812ee619a0d34100c40 (diff) | |
download | builder-1fa3ad8e1c8a81f04904d0aed6401955809d390f.tar.xz |
bin/build-packages: we're not interested in what this cpu /can/ do, but what architecture the installed packages actually are
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-x | bin/build-packages | 12 |
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 |