summaryrefslogtreecommitdiff
path: root/test/integration/test-kernel-helper-autoremove
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-10-16 12:54:14 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 18:04:01 +0100
commit73fe49f9b4748eddb5a2dad4f0abb51a8f63564c (patch)
treec1199076283004e3f77a88ec804a7dfd1611abfd /test/integration/test-kernel-helper-autoremove
parent002b1bc46b18e9d309d337ddb15a6ccdfb6c9dde (diff)
suggest 'apt autoremove' to get right of unneeded packages
The bugreport is more conservative in asking for a conditional, but given that this is a message intended to be read by users to be run by users we should suggest using a command intended to be used by users. And while we are at, add sudo to the message – conditional of course. Closes: 801571
Diffstat (limited to 'test/integration/test-kernel-helper-autoremove')
-rwxr-xr-xtest/integration/test-kernel-helper-autoremove10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove
index 5e9b9f59a..b4e37c46a 100755
--- a/test/integration/test-kernel-helper-autoremove
+++ b/test/integration/test-kernel-helper-autoremove
@@ -53,6 +53,10 @@ testprotected() {
testfailure --nomsg grep -e '^\^linux-image-amd64\$$' -e '^\^linux-image-686-pae\$$' -e ':i386' protected.list
}
+AUTOREMOVE='apt autoremove'
+if [ -n "$SUDO_USER" ]; then
+ AUTOREMOVE="sudo $AUTOREMOVE"
+fi
testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
@@ -63,7 +67,7 @@ The following packages were automatically installed and are no longer required:
$CURRENTKERNEL (5-1)
${CURRENTKERNEL}-686-pae:i386 (5-1)
${CURRENTKERNEL}-dbg (5-1)
-Use 'apt-get autoremove' to remove them.
+Use '$AUTOREMOVE' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget install -sV
testsuccessequal "Reading package lists...
Building dependency tree...
@@ -76,13 +80,13 @@ The following packages were automatically installed and are no longer required:
${CURRENTKERNEL}-686-pae:i386 (5-1)
${CURRENTKERNEL}-dbg (5-1)
${CURRENTKERNEL}-rt (5-1)
-Use 'apt-get autoremove' to remove them.
+Use '$AUTOREMOVE' to remove them.
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.
+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...