summaryrefslogtreecommitdiff
path: root/test/integration/test-explore-or-groups-in-markinstall
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-03-06 20:07:30 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-03-08 23:18:05 +0100
commit3967b75ae4a10d0d79560dfecb8eb210aad4f4f2 (patch)
tree58688e139f2e92f4f505ff06ef16231ac6cf4ac3 /test/integration/test-explore-or-groups-in-markinstall
parent8d8d8441f0a4974cb48bbc08a0a175886d569b1d (diff)
solver3: Verbose error messages
Introduce a new function, LongWhyStr() that returns a longer reason for why something is being installed (or not). This does the same path walk as the other function does, but it renders the clauses at each level, and one per line, so the whole output is a lot more informative. It is a separate function to keep the existing debug messages use the simple single line implication graph We remove the other special case in AddWork() for empty solutions to mke use of the general case in Solve() instead, and then adapt the case in Solve() to the same case as in Enqueue(). This also happens to fix the bug that when we encountered an empty clause we just printed the clause had no solution, but not how we got to install the package with the clause. Adapt the test suite for the changes which is an annoying amount of paperwork.
Diffstat (limited to 'test/integration/test-explore-or-groups-in-markinstall')
-rwxr-xr-xtest/integration/test-explore-or-groups-in-markinstall18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/integration/test-explore-or-groups-in-markinstall b/test/integration/test-explore-or-groups-in-markinstall
index 4c67296d7..60de59193 100755
--- a/test/integration/test-explore-or-groups-in-markinstall
+++ b/test/integration/test-explore-or-groups-in-markinstall
@@ -161,7 +161,13 @@ testfailureequal "$BADSOLVETEXT3
The following packages have unmet dependencies:
bad-upgrade-level1 : Depends: bad-upgrade-level0 (>= 2) but 1 is to be installed
Depends: unneeded2 but it is not going to be installed
-E: Unsatisfiable dependency group bad-upgrade-level0:amd64=2 -> unknown:amd64" apt install bad-upgrade-level1 -s --solver 3.0
+E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. bad-upgrade-level0:amd64=2 is selected as an upgrade because:
+ 1. bad-upgrade-level1:amd64=2 is selected as an upgrade
+ 2. bad-upgrade-level1:amd64=2 Depends bad-upgrade-level0 (>= 2)
+ 2. bad-upgrade-level0:amd64=2 Depends unknown
+ but none of the choices are installable:
+ [no choices]" apt install bad-upgrade-level1 -s --solver 3.0
testfailureequal "$BADSOLVETEXT
The following packages have unmet dependencies:
bad-conflict-level0 : Conflicts: bad-conflict-level2 but 1 is to be installed
@@ -171,7 +177,15 @@ testfailureequal "$BADSOLVETEXT3
The following packages have unmet dependencies:
bad-conflict-level2 : Depends: bad-conflict-level1 but it is not going to be installed
Depends: unneeded2 but it is not going to be installed
-E: Conflict: bad-conflict-level2:amd64=1 -> not bad-conflict-level0:amd64 -> not bad-conflict-level1:amd64 but bad-conflict-level2:amd64=1 -> bad-conflict-level2:amd64 -> bad-conflict-level1:amd64" apt install bad-conflict-level2 -s --solver 3.0
+E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. bad-conflict-level1:amd64 is selected for install because:
+ 1. bad-conflict-level2:amd64=1 is selected for install
+ 2. bad-conflict-level2:amd64 Depends bad-conflict-level1
+ 2. bad-conflict-level1:amd64 Depends bad-conflict-level0
+ but none of the choices are installable:
+ - bad-conflict-level0:amd64 is not selected for install because:
+ 1. bad-conflict-level2:amd64=1 is selected for install as above
+ 2. bad-conflict-level0:amd64 Conflicts bad-conflict-level2" apt install bad-conflict-level2 -s --solver 3.0
if $TEST_WITH_APTITUDE; then
testsuccesstailequal 6 'The following packages have been kept back: