From 4f2e655ad58682e4cf084a963c3d3c7b0cf45e7e Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 26 Aug 2019 16:34:35 +0200 Subject: [PATCH] Only attempt removing qemu-user-static for root or unshare mode --- mmdebstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index fcfbb75..f7fffc4 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -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: $!"; }