diff options
Diffstat (limited to 'libre/debootstrap/arch-detect.patch')
-rw-r--r-- | libre/debootstrap/arch-detect.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libre/debootstrap/arch-detect.patch b/libre/debootstrap/arch-detect.patch new file mode 100644 index 000000000..8d2030ae6 --- /dev/null +++ b/libre/debootstrap/arch-detect.patch @@ -0,0 +1,17 @@ +--- 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="$(. /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 |