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