summaryrefslogtreecommitdiff
path: root/test/integration/test-multiarch-allowed
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-multiarch-allowed
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-multiarch-allowed')
-rwxr-xr-xtest/integration/test-multiarch-allowed95
1 files changed, 82 insertions, 13 deletions
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed
index 9d8920e0f..ca13cc50d 100755
--- a/test/integration/test-multiarch-allowed
+++ b/test/integration/test-multiarch-allowed
@@ -64,18 +64,36 @@ Inst needsfoo:i386 (1 unstable [i386])
Conf foo:i386 (1 unstable [i386])
Conf needsfoo:i386 (1 unstable [i386])' aptget install needsfoo:i386 -s
# FIXME: same problem, but two different unmet dependency messages depending on install order
-testfailuremsg "E: Conflict: foo:amd64=1 -> not foo:i386 -> not needsfoo:i386 but needsfoo:i386=1 -> needsfoo:i386" aptget install needsfoo:i386 foo:amd64 -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needsfoo:i386=1 is selected for install
+ 2. needsfoo:i386 Depends foo:i386
+ but none of the choices are installable:
+ - foo:i386 is not selected for install because:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:i386 Conflicts foo" aptget install needsfoo:i386 foo:amd64 -s --solver 3.0
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: Unable to correct problems, you have held broken packages." aptget install needsfoo:i386 foo:amd64 -s --solver internal
-testfailuremsg "E: Conflict: foo:amd64=1 -> not foo:i386 -> not needsfoo:i386 but needsfoo:i386=1 -> needsfoo:i386" aptget install foo:amd64 needsfoo:i386 -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needsfoo:i386=1 is selected for install
+ 2. needsfoo:i386 Depends foo:i386
+ but none of the choices are installable:
+ - foo:i386 is not selected for install because:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:i386 Conflicts foo" aptget install foo:amd64 needsfoo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needsfoo:i386 : Depends: foo:i386 but it is not installable
E: Unable to correct problems, you have held broken packages." aptget install foo:amd64 needsfoo:i386 -s --solver internal
-testfailuremsg "E: Conflict: foo:i386=1 -> not foo:amd64 -> not needsfoo:amd64 but needsfoo:amd64=1 -> needsfoo:amd64" aptget install needsfoo foo:i386 -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needsfoo:amd64=1 is selected for install
+ 2. needsfoo:amd64 Depends foo
+ but none of the choices are installable:
+ - foo:amd64 is not selected for install because:
+ 1. foo:i386=1 is selected for install
+ 2. foo:amd64 Conflicts foo:i386" aptget install needsfoo foo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
foo : Conflicts: foo:i386 but 1 is to be installed
@@ -135,11 +153,19 @@ if [ "$APT_SOLVER" = "3.0" ]; then
NEEDSFOO2NATIVE="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2 : Depends: foo:any (>= 2)
-E: Unsatisfiable dependency group needsfoover2:amd64 -> foo:any:any"
+E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needsfoover2:amd64=1 is selected for install
+ 2. needsfoover2:amd64 Depends foo:any (>= 2)
+ but none of the choices are installable:
+ [no choices]"
NEEDSFOO2FOREIGN="$BADPREFIX
The following packages have unmet dependencies:
needsfoover2:i386 : Depends: foo:any (>= 2)
-E: Unsatisfiable dependency group needsfoover2:i386 -> foo:any:any"
+E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needsfoover2:i386=1 is selected for install
+ 2. needsfoover2:i386 Depends foo:any (>= 2)
+ but none of the choices are installable:
+ [no choices]"
else
NEEDSFOO2NATIVE="$BADPREFIX
The following packages have unmet dependencies:
@@ -156,9 +182,31 @@ testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 foo:i386 -
testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 foo:i386 -s
solveableinsinglearch2() {
- testfailuremsg 'E: Conflict: hatesfoo:amd64=1 -> hatesfoo:amd64 -> not foo:amd64=1 but foo:amd64=1' aptget install foo hatesfoo -s --solver 3.0
- testfailuremsg 'E: Conflict: hatesfooany:amd64=1 -> hatesfooany:amd64 -> not foo:amd64=1 but foo:amd64=1' aptget install foo hatesfooany -s --solver 3.0
- testfailuremsg 'E: Conflict: hatesfoonative:amd64=1 -> hatesfoonative:amd64 -> not foo:amd64=1 but foo:amd64=1' aptget install foo hatesfoonative -s --solver 3.0
+ testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:amd64=1 is not selected for install because:
+ 1. hatesfoo:amd64=1 is selected for install
+ 2. hatesfoo:amd64 Conflicts foo' aptget install foo hatesfoo -s --solver 3.0
+
+ if [ "$(getarchitectures)" = "amd64 " ]; then
+ testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:amd64=1 is not selected for install because:
+ 1. hatesfooany:amd64=1 is selected for install
+ 2. hatesfooany:amd64 Conflicts foo:any' aptget install foo hatesfooany -s --solver 3.0
+ else
+ testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:amd64=1 is not selected for install because:
+ 1. hatesfooany:amd64=1 is selected for install
+ 2. hatesfooany:amd64 Conflicts foo:any
+ [selected hatesfooany:amd64]' aptget install foo hatesfooany -s --solver 3.0
+ fi
+ testfailuremsg 'E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:amd64=1 is selected for install
+ 2. foo:amd64=1 is not selected for install because:
+ 1. hatesfoonative:amd64=1 is selected for install
+ 2. hatesfoonative:amd64 Conflicts foo:amd64' aptget install foo hatesfoonative -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfoo : Conflicts: foo but 1 is to be installed
@@ -171,12 +219,21 @@ The following packages have unmet dependencies:
E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s --solver internal
}
solveableinsinglearch2
-testfailuremsg "E: Conflict: hatesfoo:amd64=1 -> hatesfoo:amd64 -> not foo:i386=1 but foo:i386=1" aptget install foo:i386 hatesfoo -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:i386=1 is selected for install
+ 2. foo:i386=1 is not selected for install because:
+ 1. hatesfoo:amd64=1 is selected for install
+ 2. hatesfoo:amd64 Conflicts foo:i386" aptget install foo:i386 hatesfoo -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfoo : Conflicts: foo:i386 but 1 is to be installed
E: Unable to correct problems, you have held broken packages." aptget install foo:i386 hatesfoo -s --solver internal
-testfailuremsg "E: Conflict: hatesfooany:amd64=1 -> hatesfooany:amd64 -> not foo:i386=1 but foo:i386=1" aptget install foo:i386 hatesfooany -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. foo:i386=1 is selected for install
+ 2. foo:i386=1 is not selected for install because:
+ 1. hatesfooany:amd64=1 is selected for install
+ 2. hatesfooany:amd64 Conflicts foo:any
+ [selected hatesfooany:amd64]" aptget install foo:i386 hatesfooany -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
hatesfooany : Conflicts: foo:any
@@ -191,7 +248,11 @@ Inst hatesfoonative (1 unstable [amd64])
Conf foo:i386 (1 unstable [i386])
Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s
-testfailuremsg "E: Unsatisfiable dependency group needscoolfoo:i386 -> coolfoo:i386" aptget install needscoolfoo:i386 -s --solver 3.0
+testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needscoolfoo:i386=1 is selected for install
+ 2. needscoolfoo:i386 Depends coolfoo:i386
+ but none of the choices are installable:
+ [no choices]" aptget install needscoolfoo:i386 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoo:i386 : Depends: coolfoo:i386 but it is not installable
@@ -264,12 +325,20 @@ Inst needscoolfoover1 (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf coolfoover (1 unstable [amd64])
Conf needscoolfoover1 (1 unstable [amd64])' aptget install needscoolfoover1 -s
- testfailuremsg "E: Unsatisfiable dependency group needscoolfoover2:amd64 -> coolfoo:any:any" aptget install needscoolfoover2 -s --solver 3.0
+ testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needscoolfoover2:amd64=1 is selected for install
+ 2. needscoolfoover2:amd64 Depends coolfoo:any (>= 2)
+ but none of the choices are installable:
+ [no choices]" aptget install needscoolfoover2 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoover2 : Depends: coolfoo:any (>= 2)
E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover2 -s --solver internal
- testfailuremsg "E: Unsatisfiable dependency group needscoolfoover3:amd64 -> coolfoo:any:any" aptget install needscoolfoover3 -s --solver 3.0
+ testfailuremsg "E: Unable to satisfy dependencies. Reached two conflicting decisions:
+ 1. needscoolfoover3:amd64=1 is selected for install
+ 2. needscoolfoover3:amd64 Depends coolfoo:any (>= 2)
+ but none of the choices are installable:
+ [no choices]" aptget install needscoolfoover3 -s --solver 3.0
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoover3 : Depends: coolfoo:any (>= 2)