Only attempt removing qemu-user-static for root or unshare mode

pull/1/head
Helmut Grohne 5 years ago committed by Johannes 'josch' Schauer
parent 77f2cbee5d
commit 4f2e655ad5
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -1708,7 +1708,7 @@ sub setup {
rmdir "$options->{root}/var/lib/apt/lists/auxfiles" or die "cannot rmdir /var/lib/apt/lists/auxfiles: $!";
}
if (defined $options->{qemu} and $options->{mode} ne 'proot' and $options->{mode} ne 'fakechroot') {
if (defined $options->{qemu} and any { $_ eq $options->{mode} } ('root', 'unshare')) {
unlink "$options->{root}/usr/bin/qemu-$options->{qemu}-static" or error "cannot unlink /usr/bin/qemu-$options->{qemu}-static: $!";
}

Loading…
Cancel
Save