summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-15 10:16:28 +0200
committerErich Eckner <git@eckner.net>2019-04-15 10:16:28 +0200
commit1fa3ad8e1c8a81f04904d0aed6401955809d390f (patch)
treeedd60a86eb93c642f60cd4b57ac59cccfc2f7099 /bin/build-packages
parent0831684fba450ec59da9a812ee619a0d34100c40 (diff)
downloadbuilder-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-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