X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a0c19a217ca2ed38ae0ecb4b8d2d4f8c4e53289f..f359b7e8c03884cd9f097d4b3ff8b8b8be8053ba:/test/integration/test-bug-604222-new-and-autoremove?ds=sidebyside diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index 3b5fa20c4..da3bde5fd 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -11,12 +11,17 @@ touch rootdir/var/lib/apt/extended_states testsuccess aptmark markauto 'libvtk5.4' testmarkedauto 'libvtk5.4' +AUTOREMOVE='apt autoremove' +if [ -n "$SUDO_USER" ]; then + AUTOREMOVE="sudo $AUTOREMOVE" +fi + testsuccessequal "Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libvtk5.4 -Use 'apt-get autoremove' to remove it. +Use '$AUTOREMOVE' to remove it. The following NEW packages will be installed: libavcodec52 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. @@ -27,7 +32,7 @@ testsuccessequal "Reading package lists... Building dependency tree... Reading state information... 1 package was automatically installed and is no longer required. -Use 'apt-get autoremove' to remove it. +Use '$AUTOREMOVE' to remove it. The following NEW packages will be installed: libavcodec52 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. @@ -39,8 +44,8 @@ Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libvtk5.4 -Use 'apt-get autoremove' to remove it. -The following extra packages will be installed: +Use '$AUTOREMOVE' to remove it. +The following additional packages will be installed: libavcodec52 libopenal-dev libvtk5.4 The following NEW packages will be installed: dummy-archive libavcodec52 libopenal-dev @@ -54,8 +59,8 @@ testequal "Reading package lists... Building dependency tree... Reading state information... 1 package was automatically installed and is no longer required. -Use 'apt-get autoremove' to remove it. -The following extra packages will be installed: +Use '$AUTOREMOVE' to remove it. +The following additional packages will be installed: libavcodec52 libopenal-dev libvtk5.4 The following NEW packages will be installed: dummy-archive libavcodec52 libopenal-dev @@ -78,7 +83,7 @@ Building dependency tree... MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0 MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0 MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0 -The following extra packages will be installed: +The following additional packages will be installed: libavcodec52 libopenal-dev The following NEW packages will be installed: dummy-archive libavcodec52 libopenal-dev