From 1409405af789cad45db68c479c9bb6b636d395d0 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Mon, 22 Oct 2018 15:03:36 +0200 Subject: [PATCH] always clean apt from the outside in case there is no apt inside the chroot --- mmdebstrap | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 8d2aba5..6bdfb75 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1185,15 +1185,9 @@ sub setup { # clean up temporary configuration file unlink "$options->{root}/etc/apt/apt.conf.d/00mmdebstrap" or die "failed to unlink /etc/apt/apt.conf.d/00mmdebstrap: $!"; - # if there is no apt inside the chroot, clean it from the outside print STDERR "I: cleaning package lists and apt cache...\n"; - if ($options->{variant} eq 'essential') { - run_apt_progress 'apt-get', '--option', 'Dir::Etc::SourceList=/dev/null', 'update'; - run_apt_progress 'apt-get', 'clean'; - } else { - run_apt_progress @chrootcmd, 'apt-get', '--option', 'Dir::Etc::SourceList=/dev/null', 'update'; - run_apt_progress @chrootcmd, 'apt-get', 'clean'; - } + run_apt_progress 'apt-get', '--option', 'Dir::Etc::SourceList=/dev/null', 'update'; + run_apt_progress 'apt-get', 'clean'; if (defined $options->{qemu} and $options->{mode} ne 'proot' and $options->{mode} ne 'fakechroot') { unlink "$options->{root}/usr/bin/qemu-$options->{qemu}-static" or die "cannot unlink /usr/bin/qemu-$options->{qemu}-static";