]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-bug-613420-new-garbage-dependency
acquire: Use priority queues and a 3 stage pipeline design
[apt.git] / test / integration / test-bug-613420-new-garbage-dependency
index 5839f8798b98d53ed59a0100a1458baa5b9d94e0..b225bd60e1ec4ebc4039ec237559d77344749f56 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -e
 
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 setupenvironment
 configarchitecture "i386"
 
 setupenvironment
 configarchitecture "i386"
 
@@ -11,20 +11,23 @@ insertpackage 'unstable' 'libreoffice-core' 'all' '1:3.3.1~rc1-2' 'Conflicts: op
 insertpackage 'unstable' 'libreoffice-officebean' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core'
 insertpackage 'unstable' 'openoffice.org-officebean' 'all' '1:3.3.0-5' 'Depends: libreoffice-officebean'
 
 insertpackage 'unstable' 'libreoffice-officebean' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core'
 insertpackage 'unstable' 'openoffice.org-officebean' 'all' '1:3.3.0-5' 'Depends: libreoffice-officebean'
 
-
 setupaptarchive
 
 touch rootdir/var/lib/apt/extended_states
 testsuccess aptmark markauto openoffice.org-officebean
 testmarkedauto openoffice.org-officebean
 setupaptarchive
 
 touch rootdir/var/lib/apt/extended_states
 testsuccess aptmark markauto openoffice.org-officebean
 testmarkedauto openoffice.org-officebean
+AUTOREMOVE='apt autoremove'
+if [ -n "$SUDO_USER" ]; then
+       AUTOREMOVE="sudo $AUTOREMOVE"
+fi
 
 testfailureequal "Reading package lists...
 Building dependency tree...
 Reading state information...
 The following packages were automatically installed and are no longer required:
   libreoffice-officebean openoffice.org-officebean
 
 testfailureequal "Reading package lists...
 Building dependency tree...
 Reading state information...
 The following packages were automatically installed and are no longer required:
   libreoffice-officebean openoffice.org-officebean
-Use 'apt-get autoremove' to remove them.
-The following extra packages will be installed:
+Use '$AUTOREMOVE' to remove them.
+The following additional packages will be installed:
   libreoffice-core libreoffice-officebean openoffice.org-officebean
 The following packages will be REMOVED:
   openoffice.org-core
   libreoffice-core libreoffice-officebean openoffice.org-officebean
 The following packages will be REMOVED:
   openoffice.org-core
@@ -35,3 +38,19 @@ The following packages will be upgraded:
 1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
 After this operation, 126 MB disk space will be freed.
 E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only
 1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
 After this operation, 126 MB disk space will be freed.
 E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+2 packages were automatically installed and are no longer required.
+Use '$AUTOREMOVE' to remove them.
+The following additional packages will be installed:
+  libreoffice-core libreoffice-officebean openoffice.org-officebean
+The following packages will be REMOVED:
+  openoffice.org-core
+The following NEW packages will be installed:
+  libreoffice libreoffice-core libreoffice-officebean
+The following packages will be upgraded:
+  openoffice.org-officebean
+1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
+After this operation, 126 MB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only -o APT::Get::HideAutoRemove=small