From a4ce187b40f3bbd110a7cc35f9a5af5a8b7b0c9e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 12 Mar 2025 18:34:48 +0100 Subject: solver3: Fix Recommends/Suggests vs Enhances confusion We accidentally considered an Enhances a reason to keep a package installed, which of course it is not, fix the determination of "existing soft dependency" to only include soft dependencies that should keep a package installed in the autoremover to solve the issue. This also fixes edsp/mantic-upgrade-rel-to-2024-05-29.edsp to not install llvm-13-dev for clang-13 which is an installed package with no upgrade. Also ensure we stop after the first match; the DependsList() is ordered by decreasing priority and we don't want to override Recommends by Suggests in case a package declares both... LP: #2101800 --- test/integration/test-solver-recommends-depends | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/integration/test-solver-recommends-depends b/test/integration/test-solver-recommends-depends index 90c5050a7..4b2f91254 100755 --- a/test/integration/test-solver-recommends-depends +++ b/test/integration/test-solver-recommends-depends @@ -13,9 +13,17 @@ insertpackage 'unstable' 'x' 'all' '3' 'Depends: xx Recommends: b' insertpackage 'unstable' 'xx' 'all' '3' 'Depends: a | b Recommends: b' +insertpackage 'installed,unstable' 'recommends-and-enhances' 'all' '3' 'Recommends: b +Enhances:b' setupaptarchive +msgmsg "Test that the Enhances does not confuse the Recommends algorithm" +testsuccessequal "Reading package lists... +Building dependency tree... +Calculating upgrade... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." apt full-upgrade -s + msgmsg "Test that the Recommends does not influence the Depends" testsuccessequal "The following additional packages will be installed: a b -- cgit v1.2.3-70-g09d2