]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-disappearing-packages
ensure outdated files are dropped without lists-cleanup
[apt.git] / test / integration / test-disappearing-packages
index ffe692c100187ad751b9d6dca1543398ee3e4c7a..177491d81e0bef51e19b9d5650887854e276ed70 100755 (executable)
@@ -33,7 +33,7 @@ testsuccess aptget install old-pkg=1.0 --trivial-only
 
 testmarkedauto # old-pkg is manual installed
 
-CMD='aptget dist-upgrade -y -q=0'
+CMD='aptget dist-upgrade -y'
 msgtest 'Test for equality of' "$CMD"
 COMPAREFILE="$(mktemp)"
 echo 'The following package disappeared from your system as
@@ -44,11 +44,22 @@ $CMD 2>&1 | tail -n 4 | diff -u "$COMPAREFILE" - && msgpass || msgfail
 rm "$COMPAREFILE"
 
 sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #"
-testfileequal 'rootdir/var/log/apt/history.log' '
+if [ -n "$SUDO_USER" ]; then
+       testfileequal 'rootdir/var/log/apt/history.log' "
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: old-pkg:native (1.0)
+
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: new-pkg:native (2.0, automatic)
+Upgrade: old-pkg:native (1.0, 2.0)
+Disappeared: old-pkg (1.0)"
+else
+       testfileequal 'rootdir/var/log/apt/history.log' '
 Install: old-pkg:native (1.0)
 
 Install: new-pkg:native (2.0, automatic)
 Upgrade: old-pkg:native (1.0, 2.0)
 Disappeared: old-pkg (1.0)'
+fi
 
 testmarkedauto  # new-pkg should have get the manual flag from old-pkg