summarylogtreecommitdiffstats
path: root/arch-detect.patch
diff options
context:
space:
mode:
authorArti Zirk2018-07-04 22:38:06 +0300
committerArti Zirk2018-07-04 22:38:06 +0300
commite4837e17e927c2335716e47dfcf8264c971f87a5 (patch)
treee67270f11565077cf7b117f9e2141e6d96dced8d /arch-detect.patch
downloadaur-e4837e17e927c2335716e47dfcf8264c971f87a5.tar.gz
Import ABS version and change soruce to upstream git repo
Diffstat (limited to 'arch-detect.patch')
-rw-r--r--arch-detect.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch-detect.patch b/arch-detect.patch
new file mode 100644
index 00000000000..2a76428fdd6
--- /dev/null
+++ b/arch-detect.patch
@@ -0,0 +1,21 @@
+diff --git a/debootstrap b/debootstrap
+index fcdb20f..184900d 100755
+--- a/debootstrap
++++ b/debootstrap
+@@ -427,6 +427,16 @@ elif in_path udpkg && \
+ HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
+ elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
+ HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
++elif in_path pacman; then
++ # pacman 5.1 will have `pacman-conf Architecture`
++ CARCH="$(bash -c '. /etc/makepkg.conf && echo $CARCH')"
++ case "$CARCH" in
++ "i686") HOST_ARCH="i386" ;;
++ "x86_64") HOST_ARCH="amd64" ;;
++ "armv7h") HOST_ARCH="armhf" ;;
++ "aarch64") HOST_ARCH="arm64" ;;
++ *) echo "Unknown architecture: $CARCH" && exit 1
++ esac
+ fi
+ HOST_OS="$HOST_ARCH"
+ # basic host OS guessing for non-Debian systems