summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-never-markauto-sections
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-apt-never-markauto-sections
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-apt-never-markauto-sections')
-rwxr-xr-xtest/integration/test-apt-never-markauto-sections13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/integration/test-apt-never-markauto-sections b/test/integration/test-apt-never-markauto-sections
index 95ba47553..bf08507d0 100755
--- a/test/integration/test-apt-never-markauto-sections
+++ b/test/integration/test-apt-never-markauto-sections
@@ -49,7 +49,18 @@ Remv foreignpkg:i386 [1]
Remv nosection [1]
Remv texteditor [1]' aptget autoremove mydesktop -s
-testfailuremsg 'E: Conflict: not texteditor:amd64 -> not bad-texteditor:amd64 but mydesktop:amd64 -> mydesktop-core:amd64 -> bad-texteditor:amd64' aptget autoremove texteditor -s --solver 3.0 #-o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
+testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. bad-texteditor:amd64 is selected for install because:
+ 1. mydesktop:amd64 is selected for install
+ 2. mydesktop:amd64 Depends mydesktop-core
+ 3. mydesktop-core:amd64 Depends bad-texteditor | texteditor
+ [selected mydesktop-core:amd64]
+ For context, additional choices that could not be installed:
+ * In mydesktop-core:amd64 Depends bad-texteditor | texteditor:
+ - texteditor:amd64 is selected for removal
+ 2. bad-texteditor:amd64 Depends texteditor
+ but none of the choices are installable:
+ - texteditor:amd64 is selected for removal' aptget autoremove texteditor -s --solver 3.0 #-o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...