summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-install-deb
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-get-install-deb
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-get-install-deb')
-rwxr-xr-xtest/integration/test-apt-get-install-deb12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index 1540db272..07de975c4 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -32,7 +32,11 @@ done
buildsimplenativepackage 'foo' 'i386,amd64' '1.0'
-testfailuremsg "E: Conflict: foo:amd64=1.0 -> foo:amd64 but foo:i386=1.0 -> not foo:amd64" aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:amd64 is not selected for install because:
+ 1. foo:i386=1.0 is selected for install
+ 2. foo:amd64 Conflicts foo:i386
+ 2. foo:amd64=1.0 is selected for install" aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s --solver 3.0
testfailureequal "Reading package lists...
Building dependency tree...
Note, selecting 'foo:i386' instead of './incoming/foo_1.0_i386.deb'
@@ -177,7 +181,11 @@ echo 'Package: /pkg-/
Pin: release a=experimental
Pin-Priority: 501' > rootdir/etc/apt/preferences.d/pinit
-testfailuremsg 'E: Unsatisfiable dependency group pkg-last-line-parse:amd64 -> pkg-as-it-should-be:amd64' aptget install -q=0 ./incoming/pkg-last-line-parse_0_all.deb --solver 3.0
+testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. pkg-last-line-parse:amd64=0 is selected for install
+ 2. pkg-last-line-parse:amd64 PreDepends pkg-as-it-should-be
+ but none of the choices are installable:
+ [no choices]' aptget install -q=0 ./incoming/pkg-last-line-parse_0_all.deb --solver 3.0
testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install -q=0 ./incoming/pkg-last-line-parse_0_all.deb --solver internal
testsuccess aptget install ./incoming/pkg-as-it-should-be_0_all.deb
testsuccess aptget install ./incoming/pkg-last-line-parse_0_all.deb