summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/apt.conf.autoremove26
-rwxr-xr-xtest/integration/test-kernel-helper-autoremove12
2 files changed, 10 insertions, 28 deletions
diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.autoremove
index f9d9e85d4..478c571e0 100644
--- a/debian/apt.conf.autoremove
+++ b/debian/apt.conf.autoremove
@@ -10,31 +10,13 @@ APT
VersionedKernelPackages
{
- # linux kernels
- "linux-image";
- "linux-headers";
- "linux-image-extra";
- "linux-modules";
- "linux-modules-extra";
- "linux-signed-image";
- "linux-image-unsigned";
- # kfreebsd kernels
- "kfreebsd-image";
- "kfreebsd-headers";
- # hurd kernels
- "gnumach-image";
+ # kernels
+ "linux-.*";
+ "kfreebsd-.*";
+ "gnumach-.*";
# (out-of-tree) modules
".*-modules";
".*-kernel";
- "linux-backports-modules-.*";
- "linux-modules-.*";
- # tools
- "linux-tools";
- "linux-cloud-tools";
- # build info
- "linux-buildinfo";
- # source code
- "linux-source";
};
Never-MarkAuto-Sections
diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove
index 8cde3432f..9cc978645 100755
--- a/test/integration/test-kernel-helper-autoremove
+++ b/test/integration/test-kernel-helper-autoremove
@@ -46,10 +46,10 @@ testprotected() {
testfailure --nomsg grep '^[A-Z]: ' protected.list
msgtest 'Check kernel autoremoval protection list includes' 'most recent kernel'
- testsuccess --nomsg grep '^\^linux-image-100\\\.0\\\.0-1-generic\$$' protected.list
+ testsuccess --nomsg grep '^\^linux-.*-100\\\.0\\\.0-1-generic\$$' protected.list
msgtest 'Check kernel autoremoval protection list includes' 'running kernel'
- testsuccess --nomsg grep "^\\^linux-image-$(uname -r | tr '[A-Z]' '[a-z]' | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list
+ testsuccess --nomsg grep "^\\^linux-.*-$(uname -r | tr '[A-Z]' '[a-z]' | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list
msgtest 'Check kernel autoremoval protection list does not include' 'metapackages'
testfailure --nomsg grep -e '^\^linux-image-amd64\$$' -e '^\^linux-image-686-pae\$$' -e ':i386' protected.list
@@ -115,7 +115,7 @@ Remv ${CURRENTKERNEL}-dbg [5-1]" aptget autoremove -sV
msgmsg "run without parameter"
testprotected
msgtest 'Check kernel autoremoval protection list does not include' 'old kernel'
-testfailure --nomsg grep '^\^linux-image-1\\\.0\\\.0-2-generic\$$' protected.list
+testfailure --nomsg grep '^\^linux-.*-1\\\.0\\\.0-2-generic\$$' protected.list
export COLUMNS=99999
testsuccessequal "Reading package lists...
Building dependency tree...
@@ -134,9 +134,9 @@ msgmsg "install unknown kernel"
# know for sure without complicated detection mechanisms
testprotected 1.0.0-2-ungeneric
msgtest 'Check kernel autoremoval protection list does not include' 'old kernel'
-testfailure --nomsg grep '^\^linux-image-1\\\.0\\\.0-2-generic\$$' protected.list
+testfailure --nomsg grep '^\^linux-.*-1\\\.0\\\.0-2-generic\$$' protected.list
msgtest 'Check kernel autoremoval protection list does include' 'unknown installed kernel'
-testsuccess --nomsg grep '^\^linux-image-1\\\.0\\\.0-2-ungeneric\$$' protected.list
+testsuccess --nomsg grep '^\^linux-.*-1\\\.0\\\.0-2-ungeneric\$$' protected.list
export COLUMNS=9
testsuccessequal "Reading package lists...
Building dependency tree...
@@ -154,7 +154,7 @@ unset COLUMNS
msgmsg "install an old kernel"
testprotected 1.0.0-2-generic
msgtest 'Check kernel autoremoval protection list includes' 'installed kernel'
-testsuccess --nomsg grep '^\^linux-image-1\\\.0\\\.0-2-generic\$$' protected.list
+testsuccess --nomsg grep '^\^linux-.*-1\\\.0\\\.0-2-generic\$$' protected.list
export COLUMNS=9
testsuccessequal "Reading package lists...
Building dependency tree...