check whether qemu-$arch-static exists early

This commit is contained in:
Johannes 'josch' Schauer 2020-04-10 12:26:42 +02:00
parent f50ca9bf6d
commit ab5d5777d5
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -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";