summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-11-09 14:22:22 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-11-09 16:18:54 +0100
commit9444da765692b9f49a06720b5a75a168d6552c1c (patch)
treee51b0523aa7268f2f902395505399bacacf29ca8 /test/integration
parente133bb5e81b10bf059b3abeab2d9e41f7206e446 (diff)
fix testcase expecting incorrect remove log from dpkg
dpkg 1.18.11 includes: * Do not log nor print duplicate dpkg removal action. We print “Removing <package> (<version>)” lines and log remove action twice when purging a package from frontends, because they usually first call --remove and then --purge sequentially. When purging a package which is already in config-files (i.e. it has been removed before), do not print nor log the remove action.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-no-fds-leaked-to-maintainer-scripts22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
index 7b5d6727e..747af69ff 100755
--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
@@ -77,7 +77,26 @@ checkpurge() {
tail -n +3 rootdir/var/log/apt/term.log | head -n -1 > terminal.log
testfileequal 'terminal.log' "$(cat terminal.output)"
- testequal "startup packages remove
+ if dpkg --compare-versions "$(dpkg_version)" 'ge' '1.18.11'; then
+ testequal "startup packages remove
+status installed $PKGNAME 1.0
+remove $PKGNAME 1.0 <none>
+status half-configured $PKGNAME 1.0
+status half-installed $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+startup packages configure
+startup packages purge
+purge $PKGNAME 1.0 <none>
+status config-files $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+status config-files $PKGNAME 1.0
+status not-installed $PKGNAME <none>
+startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
+ else
+ testequal "startup packages remove
status installed $PKGNAME 1.0
remove $PKGNAME 1.0 <none>
status half-configured $PKGNAME 1.0
@@ -95,6 +114,7 @@ status config-files $PKGNAME 1.0
status config-files $PKGNAME 1.0
status not-installed $PKGNAME <none>
startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
+ fi
testequalor2 "dpkg-query: no packages found matching ${PKGNAME}" "No packages found matching ${PKGNAME}." dpkg -l "$PKGNAME"
}
checkpurge