From ab5d5777d506d8bcf9e50790ab777b90b5b8714b Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 10 Apr 2020 12:26:42 +0200 Subject: [PATCH] check whether qemu-$arch-static exists early --- mmdebstrap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index 6ec0506..e865c64 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -3344,6 +3344,12 @@ sub main() { . " binary"; } $options->{qemu} = $deb2qemu->{ $options->{nativearch} }; + if (any { $_ eq $options->{mode} } ('root', 'unshare')) { + my $qemubin = "/usr/bin/qemu-$options->{qemu}-static"; + if (!-e $qemubin) { + error "cannot find $qemubin"; + } + } } elsif ($withemu == 1 and $noemu == 1) { info "$options->{nativearch} is different from $hostarch but" . " can be executed natively";