Skip to content

Commit 091d30a

Browse files
bwhacksmasahir0y
authored andcommitted
builddeb: Change architecture detection fallback to use dpkg-architecture
We currently use dpkg --print-architecture, which reports the architecture of the build machine. We can make a better guess than this by asking dpkg-architecture what the host architecture, i.e. the default architecture for building packages, is. This is sensitive to environment variables such as CC and DEB_HOST_ARCH, which should already be set in a cross-build environment. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent f2abcc1 commit 091d30a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/package/mkdebian‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ set_debarch() {
4242
fi
4343
;;
4444
*)
45-
debarch=$(dpkg --print-architecture)
45+
debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
4646
echo "" >&2
4747
echo "** ** ** WARNING ** ** **" >&2
4848
echo "" >&2
4949
echo "Your architecture doesn't have its equivalent" >&2
5050
echo "Debian userspace architecture defined!" >&2
51-
echo "Falling back to using your current userspace instead!" >&2
51+
echo "Falling back to the current host architecture ($debarch)." >&2
5252
echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
5353
echo "" >&2
5454
;;

0 commit comments

Comments
 (0)