summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2018-04-17 10:50:44 +0200
committerJonas Smedegaard <dr@jones.dk>2018-04-17 10:50:44 +0200
commit53d67aee8a690ce40665294d99ef327bfa8e7d41 (patch)
tree507f0d5d1ce609b9a9ad9a79fbbb697c208fd9cf
parentde100167c8a7585d2c02b00c24ed7cb196240c23 (diff)
Avoid qemu if arch-test resolves it as unneeded.
-rw-r--r--README2
-rwxr-xr-xskel/multistrap-hooks/completion_50_configscript.sh6
2 files changed, 6 insertions, 2 deletions
diff --git a/README b/README
index fd37f06..23c42d2 100644
--- a/README
+++ b/README
@@ -36,7 +36,7 @@ Use power jack (USB-OTG is too weak as power source).
Build environment should be Debian Sid or Buster,
with these packages installed:
- apt install make curl boxer cpio u-boot-tools fusefat pigz eatmydata fakeroot multistrap parted udev proot qemu-user-static fuse2fs rsync sudo
+ apt install make curl boxer cpio u-boot-tools fusefat pigz eatmydata fakeroot multistrap parted udev proot qemu-user-static fuse2fs rsync sudo arch-test
Other environments may work too,
just please mention loudly any deviation when reporting bugs.
diff --git a/skel/multistrap-hooks/completion_50_configscript.sh b/skel/multistrap-hooks/completion_50_configscript.sh
index 088190d..cef6420 100755
--- a/skel/multistrap-hooks/completion_50_configscript.sh
+++ b/skel/multistrap-hooks/completion_50_configscript.sh
@@ -40,7 +40,11 @@ if [ "$arch" != "$arch_host" ]; then
multiarch=$(basename "$(dirname "$(find "$fs/usr/lib" -type d -name libfakeroot)")")
cpu=$(echo "$multiarch" | cut -d- -f1)
fi
- qemu=$(/usr/sbin/update-binfmts --display "qemu-$cpu" | grep -Po '(?<=interpreter = /usr/bin/).*') #'
+ if [ which arch-test ] && arch-test "$arch"; then
+ qemu=
+ else
+ qemu=$(/usr/sbin/update-binfmts --display "qemu-$cpu" | grep -Po '(?<=interpreter = /usr/bin/).*') #'
+ fi
fi
if [ -n "${FAKEROOTKEY:-}" ] && [ "${FAKECHROOT:-}" != "true" ]; then
PATH=/usr/sbin:/usr/bin:/sbin:/bin \