summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2011-08-10 12:03:40 (GMT)
committerColin Watson <cjwatson@debian.org>2011-08-10 12:03:40 (GMT)
commitf42d81fae004c3d4a5e51485f893dd7b030e38cc (patch)
treeff6dcd27343bfbf150f6f41b3fc19a4c01259d01
parentd7cccc36a992184ea59690342b767d4633d04d52 (diff)
downloaddebootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.zip
debootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.tar.gz
debootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.tar.bz2
Don't use --arch when we specifically care about the host architecture (closes: #637298).
-rw-r--r--debian/changelog2
-rwxr-xr-xdebootstrap17
-rw-r--r--functions6
3 files changed, 16 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index d48ee53..51869cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ debootstrap (1.0.35) UNRELEASED; urgency=low
[ Robert Millan ]
* Don't build devices.tar.gz if building on GNU/kFreeBSD (closes:
#637297).
+ * Don't use --arch when we specifically care about the host architecture
+ (closes: #637298).
-- Colin Watson <cjwatson@debian.org> Wed, 10 Aug 2011 12:59:44 +0100
diff --git a/debootstrap b/debootstrap
index 0e78bb4..03a176e 100755
--- a/debootstrap
+++ b/debootstrap
@@ -28,6 +28,7 @@ KEYRING=""
DISABLE_KEYRING=""
VARIANT=""
ARCH=""
+HOST_ARCH=""
KEEP_DEBOOTSTRAP_DIR=""
USE_DEBIANINSTALLER_INTERACTION=""
SECOND_STAGE_ONLY=""
@@ -389,20 +390,24 @@ fi
###########################################################################
-if [ "$ARCH" != "" ]; then
- true
-elif [ -x /usr/bin/dpkg ] && \
+if [ -x /usr/bin/dpkg ] && \
/usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
- ARCH=`/usr/bin/dpkg --print-architecture`
+ HOST_ARCH=`/usr/bin/dpkg --print-architecture`
elif type udpkg >/dev/null 2>&1 && \
udpkg --print-architecture >/dev/null 2>&1; then
- ARCH=`/usr/bin/udpkg --print-architecture`
+ HOST_ARCH=`/usr/bin/udpkg --print-architecture`
elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
- ARCH=`cat $DEBOOTSTRAP_DIR/arch`
+ HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch`
else
error 1 WHATARCH "Couldn't work out current architecture"
fi
+if [ "$ARCH" != "" ]; then
+ true
+else
+ ARCH=$HOST_ARCH
+fi
+
if [ "$TARGET" = "/" ]; then
CHROOT_CMD=""
elif doing_variant scratchbox; then
diff --git a/functions b/functions
index fd94a59..98c7652 100644
--- a/functions
+++ b/functions
@@ -938,7 +938,7 @@ clear_mtab () {
}
setup_proc () {
- case "$ARCH" in
+ case "$HOST_ARCH" in
kfreebsd-*)
umount_on_exit /dev
umount_on_exit /proc
@@ -977,7 +977,7 @@ setup_devices () {
return 0
fi
- case "$ARCH" in
+ case "$HOST_ARCH" in
kfreebsd-*)
in_target mount -t devfs devfs /dev ;;
hurd-*)
@@ -1198,7 +1198,7 @@ get_next_predep () {
check_sane_mount () {
mkdir -p "$1"
- case "$ARCH" in
+ case "$HOST_ARCH" in
kfreebsd-*|hurd-*)
;;
*)