From 3babdb04cb10da72615f310fc428f40faeb73854 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 26 Nov 2020 23:10:38 +0100 Subject: [PATCH] coverage.sh: /etc/apt/apt.conf.d/01autoremove-kernels is not anymore always created --- coverage.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coverage.sh b/coverage.sh index 5c6beb6..3756adb 100755 --- a/coverage.sh +++ b/coverage.sh @@ -213,8 +213,12 @@ diff -u status1 status2 rm status1 status2 rm /tmp/debian-$dist-debootstrap/var/lib/dpkg/status /tmp/debian-$dist-mm/var/lib/dpkg/status # debootstrap exposes the hosts's kernel version -rm /tmp/debian-$dist-debootstrap/etc/apt/apt.conf.d/01autoremove-kernels \ - /tmp/debian-$dist-mm/etc/apt/apt.conf.d/01autoremove-kernels +if [ -e /tmp/debian-$dist-debootstrap/etc/apt/apt.conf.d/01autoremove-kernels ]; then + rm /tmp/debian-$dist-debootstrap/etc/apt/apt.conf.d/01autoremove-kernels +fi +if [ -e /tmp/debian-$dist-mm/etc/apt/apt.conf.d/01autoremove-kernels ]; then + rm /tmp/debian-$dist-mm/etc/apt/apt.conf.d/01autoremove-kernels +fi # who creates /run/mount? if [ -e "/tmp/debian-$dist-debootstrap/run/mount/utab" ]; then rm "/tmp/debian-$dist-debootstrap/run/mount/utab"