summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-07-01 10:06:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-07-01 10:06:53 +0200
commita0ed43f7323b9d7976ed0ba8d437a42e24af9eaf (patch)
treec81e4980d285dc5c3c975d827df22e18fd0a715e /test/integration
parent5a3339db48479114a0e1e11ebc8d640eb3e49933 (diff)
protect only the latest same-source providers from autoremove
Traditionally all providers are protected providing something as apt can't know which of them is actually really providing the functionality for the user ensuring that we don't propose the removal of used stuff, but that is of course also keeping stuff around which could be removed. That can cause the collection of multiple old providers until the provided package is itself no longer needed (e.g. out-of-tree kernel modules). We combat this by marking providers only from the newest source package version so that old providers built by older versions of the same source package can be garbage collected.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-apt-get-autoremove36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove
index 7a28c51f1..17dba9aec 100755
--- a/test/integration/test-apt-get-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -108,3 +108,39 @@ testdpkgnotinstalled 'po-debconf' 'debhelper'
testmarkedauto
testsuccess aptget install debhelper --solver apt -y -o Debug::pkgDepCache::Marker=1
testmarkedauto 'po-debconf'
+
+insertinstalledpackage 'bar' 'all' '1' 'Depends: foo-provider'
+insertinstalledpackage 'foo-multi1-1' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (1)'
+insertinstalledpackage 'foo-multi1-2' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (2)'
+insertinstalledpackage 'foo-multi1-3' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (3)'
+insertinstalledpackage 'foo-multi2-1' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (1)'
+insertinstalledpackage 'foo-multi2-2' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (2)'
+insertinstalledpackage 'foo-multi2-3' 'all' '1' 'Provides: foo-provider
+Source: foo-multi (3)'
+insertinstalledpackage 'foo-plus-1' 'all' '1' 'Provides: foo-provider
+Source: foo-plus (1)'
+insertinstalledpackage 'foo-plus-2' 'all' '1' 'Provides: foo-provider
+Source: foo-plus (2)'
+insertinstalledpackage 'foo-plus-3' 'all' '1' 'Provides: foo-provider
+Source: foo-plus (3)'
+insertinstalledpackage 'foo-single-1' 'all' '1' 'Provides: foo-provider'
+insertinstalledpackage 'foo-single-2' 'all' '1' 'Provides: foo-provider'
+
+testsuccess aptmark auto 'foo-*'
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ foo-multi1-1 foo-multi1-2 foo-multi2-1 foo-multi2-2 foo-plus-1 foo-plus-2
+0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
+Remv foo-multi1-1 [1]
+Remv foo-multi1-2 [1]
+Remv foo-multi2-1 [1]
+Remv foo-multi2-2 [1]
+Remv foo-plus-1 [1]
+Remv foo-plus-2 [1]' apt autoremove -s