Clean lock files as well

This commit is contained in:
Johannes 'josch' Schauer 2018-09-19 08:22:55 +02:00
parent 1adac06646
commit 49cc8cf32e
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1
2 changed files with 6 additions and 4 deletions

View file

@ -853,6 +853,12 @@ sub setup {
unlink "$options->{root}/var/log/apt/term.log"; unlink "$options->{root}/var/log/apt/term.log";
unlink "$options->{root}/var/log/alternatives.log"; unlink "$options->{root}/var/log/alternatives.log";
unlink "$options->{root}/var/cache/ldconfig/aux-cache"; unlink "$options->{root}/var/cache/ldconfig/aux-cache";
# clean up leftover lock files
unlink "$options->{root}/var/cache/apt/archives/lock";
unlink "$options->{root}/var/lib/apt/extended_states";
unlink "$options->{root}/var/lib/apt/lists/lock";
unlink "$options->{root}/var/lib/dpkg/lock-frontend";
} }
sub main() { sub main() {

View file

@ -106,10 +106,6 @@ for dist in stable testing unstable; do
diff -u status1 status2 diff -u status1 status2
rm status1 status2 rm status1 status2
sudo rm debian-$dist-debootstrap/var/lib/dpkg/status debian-$dist-mm/var/lib/dpkg/status sudo rm debian-$dist-debootstrap/var/lib/dpkg/status debian-$dist-mm/var/lib/dpkg/status
# since we installed using apt, we have to remove some leftovers
sudo rm debian-$dist-mm/var/cache/apt/archives/lock \
debian-$dist-mm/var/lib/apt/extended_states \
debian-$dist-mm/var/lib/apt/lists/lock
sudo rmdir debian-$dist-mm/var/lib/apt/lists/auxfiles sudo rmdir debian-$dist-mm/var/lib/apt/lists/auxfiles
# debootstrap exposes the hosts's kernel version # debootstrap exposes the hosts's kernel version
sudo rm debian-$dist-debootstrap/etc/apt/apt.conf.d/01autoremove-kernels \ sudo rm debian-$dist-debootstrap/etc/apt/apt.conf.d/01autoremove-kernels \