]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-external-dependency-solver-protocol
suggest 'apt autoremove' to get right of unneeded packages
[apt.git] / test / integration / test-external-dependency-solver-protocol
index a9746d4a2f98467c35e79e6f86e9bb601562e963..e22d0c5e064a8b229d057864459043a227fdccb8 100755 (executable)
@@ -81,13 +81,17 @@ Remv somestuff [1]
 Remv cool [1]
 Remv stuff [1]' aptget autoremove --solver apt somestuff -s
 
+AUTOREMOVE='apt autoremove'
+if [ -n "$SUDO_USER" ]; then
+       AUTOREMOVE="sudo $AUTOREMOVE"
+fi
 testsuccessequal "Reading package lists...
 Building dependency tree...
 Reading state information...
 Execute external solver...
 The following package was automatically installed and is no longer required:
   stuff
-Use 'apt-get autoremove' to remove it.
+Use '$AUTOREMOVE' to remove it.
 The following packages will be REMOVED:
   cool* somestuff*
 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.