X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=147465afa6a2afd528bcfc80b8867bd392c377e8;hb=134498c077007fa91c198a0fe6354466cb6a5ae7;hp=9c2105026959d5f5f384804636d2a26ee9e7817b;hpb=b8fb51c5d22a90f277a1edf03ca406105c2a74cb;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index 9c21050..147465a 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -5,11 +5,10 @@ # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2+ ################################################################################ -# http://www.debian.org/releases/stable/i386/index.html.en # variables {{{ PN="$(basename $0)" -VERSION="$(dpkg --list $PN 2>/dev/null| awk '/^i/ {print $3}')" +VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")" VERSION="${VERSION:-unknown}" MNTPOINT="/mnt/debootstrap.$$" @@ -793,6 +792,16 @@ else fi # }}} +# It is not possible to build amd64 on i686. {{{ +CURRENT_ARCH="$(uname -m)" +if [ "$CURRENT_ARCH" != "x86_64" ] ; then + if [ "$ARCH" = "amd64" ] ; then + eerror "It is not possible to build amd64 on $CURRENT_ARCH." ; eend 1 + bailout 1 + fi +fi +# }}} + checkconfiguration # finally make sure at least $TARGET is set [the partition for the new system] {{{