From 6241a82345910a4dd4f272eb097e71a0259066b1 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 29 Apr 2014 14:59:21 +0200
Subject: [PATCH] Try harder to determine the architecture
---
debootstrap | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/debootstrap b/debootstrap
index 86e9c15..d2e7e41 100755
--- a/debootstrap
+++ b/debootstrap
@@ -417,7 +417,12 @@ if in_path dpkg && \
elif in_path udpkg && \
udpkg --print-architecture >/dev/null 2>&1; then
HOST_ARCH=`/usr/bin/udpkg --print-architecture`
+elif in_path uname && \
+ uname --hardware-platform >/dev/null 2>&1; then
+ HOST_ARCH=`/bin/uname --hardware-platform |/bin/sed 's/x86_64/amd64/'`
elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
+ # XXX: On host, this is /usr/share, which explicitely MUST be
+ # arch-independent. Ouch.
HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch`
fi
HOST_OS="$HOST_ARCH"
--
2.4.3