Control: tag -1 + pending Hi,
Quoting Helmut Grohne (2019-08-21 10:22:24) > I found yet another corner case with foreign chrootless: I see you noticed that chrootless mode does not get tested in the testsuite. ;) I am now adding such tests in addition to your fixes. > This time around, mmdebstrap fails during cleanup. Close to the end around > line 1688 it checks whether we use qemu. Unless the mode is proot or > fakechroot, it cleans up the qemu binary. It turns out that chrootless is > neither proot nor fakechroot, so qemu gets cleaned up. However it was never > set up, because qemu is not needed for the chrootless mode. The qemu cleanup > should also be skipped for chrootless. Please consider applying the attached > patch. I turned your patch around a bit. Further up in the code, mmdebstrap only copies qemu-user-static if the mode is either root or unshare. It makes sense to check for the exact same condition when cleaning it up instead of checking for its inverse. Thanks! cheers, josch commit 4f2e655ad58682e4cf084a963c3d3c7b0cf45e7e (HEAD -> master) Author: Helmut Grohne <helmut.gro...@intenta.de> Date: Mon Aug 26 16:34:35 2019 +0200 Only attempt removing qemu-user-static for root or unshare mode 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: $!"; }
signature.asc
Description: signature