diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | debootstrap | 17 | ||||
-rw-r--r-- | functions | 6 |
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 @@ -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-*) ;; *) |