diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-06 20:07:30 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-08 23:18:05 +0100 |
| commit | 3967b75ae4a10d0d79560dfecb8eb210aad4f4f2 (patch) | |
| tree | 58688e139f2e92f4f505ff06ef16231ac6cf4ac3 /test/integration/test-solver3-alternatives | |
| parent | 8d8d8441f0a4974cb48bbc08a0a175886d569b1d (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-solver3-alternatives')
| -rwxr-xr-x | test/integration/test-solver3-alternatives | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/integration/test-solver3-alternatives b/test/integration/test-solver3-alternatives new file mode 100755 index 000000000..8a3645f82 --- /dev/null +++ b/test/integration/test-solver3-alternatives @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertpackage 'unstable' 'unsat' 'all' '3' 'Depends: a | b' +insertpackage 'unstable' 'a' 'all' '3' 'Depends: aa|ab' +insertpackage 'unstable' 'b' 'all' '3' 'Depends: ba|bb' +insertpackage 'unstable' 'aa' 'all' '3' 'Depends: aax' +insertpackage 'unstable' 'ab' 'all' '3' 'Depends: abx' +insertpackage 'unstable' 'ba' 'all' '3' 'Depends: bay' +insertpackage 'unstable' 'bb' 'all' '3' 'Depends: bby' +setupaptarchive + +testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions: + 1. bb:amd64 is selected for install because: + 1. unsat:amd64=3 is selected for install + 2. unsat:amd64 Depends a | b + [selected b:amd64 for install] + 3. b:amd64 Depends ba | bb + [selected b:amd64] + For context, additional choices that could not be installed: + * In unsat:amd64 Depends a | b: + - a:amd64 is not selected for install + * In b:amd64 Depends ba | bb: + - ba:amd64 is not selected for install + 2. bb:amd64 Depends bby + but none of the choices are installable: + [no choices]" apt install unsat --solver 3.0 |
