--- a/debootstrap 2016-03-22 21:13:58.000000000 +0800 +++ b/debootstrap 2016-03-22 21:13:09.573621800 +0800 @@ -419,6 +419,14 @@ HOST_ARCH=`/usr/bin/udpkg --print-architecture` elif [ -e $DEBOOTSTRAP_DIR/arch ]; then HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch` +elif in_path pacman; then + CARCH="$(/bin/bash -c '. /etc/makepkg.conf && echo $CARCH')" + case "$CARCH" in + "i686") HOST_ARCH="i386" ;; + "x86_64") HOST_ARCH="amd64" ;; + "armv7h") HOST_ARCH="armhf" ;; + *) echo "Unknown architecture: $CARCH" && exit 1 + esac fi HOST_OS="$HOST_ARCH" # basic host OS guessing for non-Debian systems