summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-12-02 10:25:44 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2024-12-02 11:37:16 +0100
commit63721d8271430c1a0996c08cc96a3a7e6f69dc52 (patch)
tree0daf220dddc711a7e8548e9a50dbb7611d2be762 /test
parentb040376b98df1dbbb93c8770e9bd3bebeb80d2f9 (diff)
solver3: Fix intransitivity of version comparison on upgrade
We only compared candidate to installed version, but candidate should dominate all versions, otherwise we end up in the fancy problem of elpa-notmuch in upgrade-noble-t64-remove-desktop-2024-03-29.edsp Where we had three versions: not-installable 0.38.3-1ubuntu1 candidate 0.38.2-1.1ubuntu2 installed 0.38.2-1ubuntu2 And received an ordering: installed > non-installable > candidate despite candidate > installed This is only visible with no-strict-pinning right now, as we are otherwise filtering out invalid choices (and hence we only have candidate and installed otherwise).
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-solver3-dependencies10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/test-solver3-dependencies b/test/integration/test-solver3-dependencies
index 330ded8f9..2aa4c4d7b 100755
--- a/test/integration/test-solver3-dependencies
+++ b/test/integration/test-solver3-dependencies
@@ -63,3 +63,13 @@ Conf enhanced (3 unstable [all])
Conf enhances (3 unstable [all])
Conf replaced (3 unstable [all])
Conf replaces (3 unstable [all])" apt dist-upgrade -s
+
+insertpackage 'testing,now' 'test' 'all' '1'
+insertpackage 'unstable' 'test' 'all' '2'
+insertpackage 'experimental' 'test' 'all' '3'
+insertpackage 'unstable' 'depends-test' 'all' '2' 'Depends: test'
+setupaptarchive
+
+testsuccess apt upgrade depends-test -o Debug::APT::Solver=3 --solver 3.0 --no-strict-pinning -s
+cp rootdir/tmp/testsuccess.output solver.log
+testsuccess grep 'test:amd64=2 | test:amd64=1 | test:amd64=3' solver.log