insertinstalledpackage 'linux-image-686-pae' 'i386' '300-1'
# ensure that the '.' is really a dot and not a wildcard
insertinstalledpackage 'linux-headers-1000000-1-generic' 'amd64' '100.0.0-1'
insertinstalledpackage 'linux-image-686-pae' 'i386' '300-1'
# ensure that the '.' is really a dot and not a wildcard
insertinstalledpackage 'linux-headers-1000000-1-generic' 'amd64' '100.0.0-1'
testsuccess aptmark hold "${CURRENTKERNEL}-rt"
testprotected() {
rm -f rootdir/etc/apt/apt.conf.d/01autoremove-kernels protected.list
testsuccess aptmark hold "${CURRENTKERNEL}-rt"
testprotected() {
rm -f rootdir/etc/apt/apt.conf.d/01autoremove-kernels protected.list
testfailure test -s rootdir/tmp/testsuccess.output
msgtest 'Check kernel autoremoval protection list' 'is created'
testfailure test -s rootdir/tmp/testsuccess.output
msgtest 'Check kernel autoremoval protection list' 'is created'
testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV
testsuccessequal "Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV
testsuccessequal "Reading package lists...
Building dependency tree...
${CURRENTKERNEL}-686-pae:i386 (5-1)
${CURRENTKERNEL}-dbg (5-1)
${CURRENTKERNEL}-rt (5-1)
${CURRENTKERNEL}-686-pae:i386 (5-1)
${CURRENTKERNEL}-dbg (5-1)
${CURRENTKERNEL}-rt (5-1)
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV --ignore-hold
testequal "Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV --ignore-hold
testequal "Reading package lists...
Building dependency tree...
Reading state information...
-6 packages were automatically installed and are no longer required.
-Use 'apt-get autoremove' to remove them.
+7 packages were automatically installed and are no longer required.
+Use '$AUTOREMOVE' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small
testequal "Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -s -o APT::Get::HideAutoRemove=small
testequal "Reading package lists...
Building dependency tree...
Remv linux-headers-1000000-1-generic [100.0.0-1]
Remv linux-image-1.0.0-2-generic [1.0.0-2]
Remv linux-image-100.0.0-1-generic [100.0.0-1]
Remv $CURRENTKERNEL [5-1]
Remv linux-headers-1000000-1-generic [100.0.0-1]
Remv linux-image-1.0.0-2-generic [1.0.0-2]
Remv linux-image-100.0.0-1-generic [100.0.0-1]
Remv $CURRENTKERNEL [5-1]