diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-03-18 17:37:49 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-04-26 13:00:24 +0200 |
commit | d6f3458badf2cfea3ca7de7632ae31daff5742be (patch) | |
tree | 7acc19c1e590fe8c2c81ef6609fa1a5a863d90da /test | |
parent | 9a54e70c1040379fb06827bacb461c61e341e694 (diff) |
Call MarkAndSweep only manually in apt-get for autoremove
An interactive tool like aptitude needs these flags current far more
often than we do as a user can see them in apt only in one very well
defined place – the autoremove display block – so we don't need to run
it up to four times while a normal "apt install" is processed as that is
just busywork.
The effect on runtime is minimal, as a single run doesn't take too long
anyhow, but it cuts down tremendously on debug output at the expense of
requiring some manual handholding.
This is opt-in so that aptitude doesn't need to change nor do we need to
change our own tools like "apt list" where it is working correctly as
intended.
A special flag and co is needed as we want to prevent the ActionGroup
inside pkgDepCache::Init to be inhibited already so we need to insert
ourselves while the DepCache is still in the process of being built.
This is also the reason why the debug output in some tests changed to
all unmarked, but that is fine as the marking could have been already
obsoleted by the actions taken, just inhibited by a proper action group.
Diffstat (limited to 'test')
5 files changed, 18 insertions, 21 deletions
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index aaeac09a8..534c50b80 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -88,8 +88,6 @@ Building dependency tree... MarkInstall libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > FU=0 Ignore MarkGarbage of libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > as its mode (Install) is protected Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected - Ignore MarkGarbage of libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > as its mode (Install) is protected - Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected The following additional packages will be installed: libavcodec52 libopenal-dev The following NEW packages will be installed: diff --git a/test/integration/test-bug-618848-always-respect-user-requests b/test/integration/test-bug-618848-always-respect-user-requests index 225db299c..f77c384c2 100755 --- a/test/integration/test-bug-618848-always-respect-user-requests +++ b/test/integration/test-bug-618848-always-respect-user-requests @@ -15,11 +15,11 @@ setupaptarchive testsuccessequal "Reading package lists... Building dependency tree... - MarkDelete libdb4.8:i386 < 1.0 @ii pmK > FU=1 - MarkDelete exim4-daemon-light:i386 < 1.0 @ii mK Ib > FU=0 - MarkInstall exim4-daemon-heavy:i386 < none -> 1.0 @un umN Ib > FU=0 - exim4-daemon-heavy:i386 Depends on libdb4.8:i386 < 1.0 @ii pmR > can't be satisfied! (dep) - MarkDelete exim4:i386 < 1.0 @ii mK Ib > FU=0 + MarkDelete libdb4.8:i386 < 1.0 @ii pK > FU=1 + MarkDelete exim4-daemon-light:i386 < 1.0 @ii K Ib > FU=0 + MarkInstall exim4-daemon-heavy:i386 < none -> 1.0 @un uN Ib > FU=0 + exim4-daemon-heavy:i386 Depends on libdb4.8:i386 < 1.0 @ii pR > can't be satisfied! (dep) + MarkDelete exim4:i386 < 1.0 @ii K Ib > FU=0 The following packages will be REMOVED: exim4 exim4-daemon-light libdb4.8 MarkDelete exim4:i386 < 1.0 @ii K > FU=1 diff --git a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict index 54781a6cc..824851278 100755 --- a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict +++ b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict @@ -18,24 +18,24 @@ setupaptarchive testsuccessequal "Reading package lists... Building dependency tree... Removing: systemd-sysv:amd64 as upgrade is not an option for runit-init:amd64 (1) - MarkDelete systemd-sysv:amd64 < 1 @ii mK > FU=0 + MarkDelete systemd-sysv:amd64 < 1 @ii K > FU=0 MarkInstall runit-init:amd64 < none -> 1 @un puN > FU=1 Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 -Investigating (0) init:amd64 < 1 @ii mK Ib > -Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pmR > +Investigating (0) init:amd64 < 1 @ii K Ib > +Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pR > Considering systemd-sysv:amd64 0 as a solution to init:amd64 5100 Added systemd-sysv:amd64 to the remove list -Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pmH > +Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pH > Considering sysvinit-core:amd64 0 as a solution to init:amd64 5100 - Ignore MarkKeep of systemd-sysv:amd64 < 1 @ii pmR > as its mode (Delete) is protected -Investigating (1) init:amd64 < 1 @ii mK Ib > -Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pmR > + Ignore MarkKeep of systemd-sysv:amd64 < 1 @ii pR > as its mode (Delete) is protected +Investigating (1) init:amd64 < 1 @ii K Ib > +Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pR > Considering systemd-sysv:amd64 5100 as a solution to init:amd64 5100 -Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pmH > +Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pH > Considering sysvinit-core:amd64 0 as a solution to init:amd64 5100 Or group remove for init:amd64 - MarkDelete init:amd64 < 1 @ii mK Ib > FU=0 + MarkDelete init:amd64 < 1 @ii K Ib > FU=0 Done The following packages will be REMOVED: init systemd-sysv diff --git a/test/integration/test-dpkg-i-apt-install-fix-broken b/test/integration/test-dpkg-i-apt-install-fix-broken index 8d800ffb7..0b75b5fb1 100755 --- a/test/integration/test-dpkg-i-apt-install-fix-broken +++ b/test/integration/test-dpkg-i-apt-install-fix-broken @@ -14,7 +14,7 @@ setupaptarchive testfailure dpkg -i incoming/autopkgtest-*.deb testsuccessequal 'Reading package lists... Building dependency tree... -Correcting dependencies... MarkInstall autopkgtest-satdep:amd64 < 1 @iU mK Nb Ib > FU=0 +Correcting dependencies... MarkInstall autopkgtest-satdep:amd64 < 1 @iU K Nb Ib > FU=0 MarkInstall debhelper:amd64 < none -> 1 @un uN > FU=0 Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 diff --git a/test/integration/test-resolver-delays-remove-decisions b/test/integration/test-resolver-delays-remove-decisions index d8dfd7c9a..8f0c7daa5 100755 --- a/test/integration/test-resolver-delays-remove-decisions +++ b/test/integration/test-resolver-delays-remove-decisions @@ -53,7 +53,7 @@ Building dependency tree... MarkInstall foo:amd64 < none -> 1 @un uN Ib > FU=0 Installing foo-dep:amd64 as Depends of foo:amd64 MarkInstall foo-dep:amd64 < none -> 1 @un uN > FU=0 - MarkDelete stuff:amd64 < 1 @ii mK > FU=0 + MarkDelete stuff:amd64 < 1 @ii K > FU=0 Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 Done @@ -79,16 +79,15 @@ Building dependency tree... MarkInstall foobar:amd64 < none -> 1 @un puN Ib > FU=1 Installing foo:amd64 as Depends of foobar:amd64 Removing: stuff:amd64 as upgrade is not an option for foo:amd64 (1) - MarkDelete stuff:amd64 < 1 @ii mK > FU=0 + MarkDelete stuff:amd64 < 1 @ii K > FU=0 MarkInstall foo:amd64 < none -> 1 @un puN Ib > FU=0 Installing foo-dep:amd64 as Depends of foo:amd64 MarkInstall foo-dep:amd64 < none -> 1 @un puN > FU=0 - MarkInstall uninstallable:amd64 < 1 @ii pmK > FU=0 + MarkInstall uninstallable:amd64 < 1 @ii pK > FU=0 Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 Done Ignore MarkGarbage of foo:amd64 < none -> 1 @un puN > as its mode (Install) is protected - Ignore MarkGarbage of foo:amd64 < none -> 1 @un puN > as its mode (Install) is protected Package 'bar' is not installed, so not removed The following additional packages will be installed: foo foo-dep |