summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-18 01:03:52 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-18 15:55:36 +0200
commit1f641cf70e9cd52c093b4b62dc392f29cf34f03e (patch)
treeac76f9a5b5423ae850a6711a9262c5d16a41f6fe /test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
parentdbed89f296106f82e9fe8f866fa87a4c14b44584 (diff)
Recognize propagated protected in pkgProblemResolver
Turns out that pkgDepCache and pkgProblemResolver maintain two (semi) independent sets of protected flags – except that a package if marked protected in the pkgProblemResolver is automatically also marked in the pkgDepCache as protected. This way the pkgProblemResolver will have as protected only the direct user requests while pkgDepCache will (hopefully) propagate the flag to unavoidable dependencies of these requests nowadays. The pkgProblemResolver was only checking his own protected flag though and based on that calls our Mark* methods usually without checking return, leading to it believing it could e.g. remove packages it actually can't remove as pkgDepCache will not allow it as it is marked as protected there. Teaching it to check for the flag in the pkgDepCache instead avoids it believing in the wrong things eventually giving up. The scoring is keeping the behaviour of adding the large score boost only for the direct user requests though as there is no telling which other sideeffects this might have if too many packages get too many points from the get-go. Second part of fixing #960705, now with pkgProblemResolver output which looks more like the whole class of problem is resolved rather than a teeny tiny edgecase it was before.
Diffstat (limited to 'test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict')
-rwxr-xr-xtest/integration/test-bug-960705-propagate-protected-to-satisfied-conflict17
1 files changed, 16 insertions, 1 deletions
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 4def47400..943e968a4 100755
--- a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
+++ b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
@@ -17,6 +17,19 @@ setupaptarchive
testsuccessequal "Reading package lists...
Building dependency tree...
+ Removing: systemd-sysv as upgrade is not an option for runit-init:amd64 (1)
+ MarkDelete systemd-sysv:amd64 < 1 @ii mK > 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 >
+ Considering systemd-sysv:amd64 0 as a solution to init:amd64 5100
+Broken init:amd64 PreDepends on sysvinit-core:amd64 < none | 1 @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
+Done
The following packages will be REMOVED:
init systemd-sysv
The following NEW packages will be installed:
@@ -24,8 +37,10 @@ The following NEW packages will be installed:
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
init systemd-sysv (due to init)
+ MarkDelete init:amd64 < 1 @ii K > FU=1
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Remv init [1]
+ MarkDelete systemd-sysv:amd64 < 1 | none @ii H > FU=1
Remv systemd-sysv [1]
Inst runit-init (1 unstable [all])
-Conf runit-init (1 unstable [all])" apt install runit-init -s
+Conf runit-init (1 unstable [all])" apt install runit-init -so Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1