aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-07-26 06:20:45 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-27 21:53:44 -0400
commit091d30aefc8a4d76ffa139a6e51dc237ea1cd599 (patch)
tree3c1f310fb72ec2ece85485c080311caa5f0ed9bd /scripts/package
parentf2abcc13e4a1b3139f1e3a0ca71bf4db8b7dfe72 (diff)
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>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/mkdebian4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 434f0b4d5231..389bf983879d 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -42,13 +42,13 @@ set_debarch() {
42 fi 42 fi
43 ;; 43 ;;
44 *) 44 *)
45 debarch=$(dpkg --print-architecture) 45 debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
46 echo "" >&2 46 echo "" >&2
47 echo "** ** ** WARNING ** ** **" >&2 47 echo "** ** ** WARNING ** ** **" >&2
48 echo "" >&2 48 echo "" >&2
49 echo "Your architecture doesn't have its equivalent" >&2 49 echo "Your architecture doesn't have its equivalent" >&2
50 echo "Debian userspace architecture defined!" >&2 50 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
52 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 52 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
53 echo "" >&2 53 echo "" >&2
54 ;; 54 ;;