diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-05-18 01:03:52 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-05-18 15:55:36 +0200 |
commit | 1f641cf70e9cd52c093b4b62dc392f29cf34f03e (patch) | |
tree | ac76f9a5b5423ae850a6711a9262c5d16a41f6fe /test/integration/test-multiarch-allowed | |
parent | dbed89f296106f82e9fe8f866fa87a4c14b44584 (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-multiarch-allowed')
-rwxr-xr-x | test/integration/test-multiarch-allowed | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed index 167f0c584..a091635f0 100755 --- a/test/integration/test-multiarch-allowed +++ b/test/integration/test-multiarch-allowed @@ -66,12 +66,12 @@ testfailureequal "$BADPREFIX The following packages have unmet dependencies: foo : Conflicts: foo:i386 but 1 is to be installed foo:i386 : Conflicts: foo but 1 is to be installed -E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages." aptget install needsfoo:i386 foo:amd64 -s +E: Unable to correct problems, you have held broken packages." aptget install needsfoo:i386 foo:amd64 -s testfailureequal "$BADPREFIX The following packages have unmet dependencies: foo : Conflicts: foo:i386 but 1 is to be installed foo:i386 : Conflicts: foo but 1 is to be installed -E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages." aptget install needsfoo foo:i386 -s +E: Unable to correct problems, you have held broken packages." aptget install needsfoo foo:i386 -s solveableinsinglearch1() { testsuccessequal "Reading package lists... |