diff options
author | Colin Watson <cjwatson@debian.org> | 2011-08-10 12:03:40 (GMT) |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-08-10 12:03:40 (GMT) |
commit | f42d81fae004c3d4a5e51485f893dd7b030e38cc (patch) | |
tree | ff6dcd27343bfbf150f6f41b3fc19a4c01259d01 /debootstrap | |
parent | d7cccc36a992184ea59690342b767d4633d04d52 (diff) | |
download | debootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.zip debootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.tar.gz debootstrap-f42d81fae004c3d4a5e51485f893dd7b030e38cc.tar.bz2 |
Don't use --arch when we specifically care about the host architecture (closes: #637298).
Diffstat (limited to 'debootstrap')
-rwxr-xr-x | debootstrap | 17 |
1 files changed, 11 insertions, 6 deletions
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 |