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 --- apt-pkg/solver3.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index b7000c52e..1bdc13559 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -243,6 +243,11 @@ class Solver // \brief If set, we use strict pinning. int Timeout{_config->FindI("APT::Solver::Timeout", 10)}; + // \brief Keep recommends installed + bool KeepRecommends{_config->FindB("APT::AutoRemove::RecommendsImportant", true)}; + // \brief Keep suggests installed + bool KeepSuggests{_config->FindB("APT::AutoRemove::SuggestsImportant", true)}; + // \brief Discover a variable, translating the underlying dependencies to the SAT presentation // // This does a breadth-first search of the entire dependency tree of var, -- cgit v1.2.3-70-g09d2