summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-24 21:57:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-24 22:37:41 +0200
commit70ff288b98a7aae2c2808112015d34f76f2d5114 (patch)
tree7359edf1ef1f6cc5d0bac9d5f8967052e4546b9b /test/integration
parent1044354995513348f4836772fe77068585091d6b (diff)
do not restore selections for already purged packages
In most cases apt was already skipping the (re)setting of packages as to be removed/purged if dpkg had told us that it already did, but we haven't dealt with it in the most obvious of the cases: Selections set for packages we touched in this operation which either restores selections even dpkg would have overridden or e.g. tries to restore a purge selection for a package which was just purged – does not happen with apt itself as it isn't using selections in this way, but higher frontends like aptitude do. The result in the later case is a warning printed by dpkg that we try to set selections for an unknown package, which is harmless per se, but can be confusing for users and we really shouldn't cause warnings in dpkg if we can help it. Reported-By: Guillem Jover on IRC
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework2
-rwxr-xr-xtest/integration/test-apt-get-autoremove3
2 files changed, 4 insertions, 1 deletions
diff --git a/test/integration/framework b/test/integration/framework
index d40c9f356..0daf776f5 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -1989,7 +1989,7 @@ testaptautotestnodpkgwarning() {
if expr match "$2" '^-dy\?' >/dev/null 2>&1; then return; fi # download-only mode
shift
done
- testfailure grep '^dpkg: warning:.*ignor.*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output"
+ testfailure grep '^dpkg: warning:.*\(ignor\|unknown\).*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output"
}
aptautotest_aptget_install() { testaptautotestnodpkgwarning "$@"; }
diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove
index cfee748af..8af864acb 100755
--- a/test/integration/test-apt-get-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -152,3 +152,6 @@ Remv foo-multi2-1 [1]
Remv foo-multi2-2 [1]
Remv foo-plus-1 [1]
Remv foo-plus-2 [1]' apt autoremove -s
+
+testdpkgstatus 'pi' '1' 'unrelated'
+testsuccess apt purge unrelated -y