From 4c48b5618ba15d4e33625cec81843891910e81a2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 11 Feb 2025 12:11:20 +0100 Subject: solver3: Defer 3.0 'deep' autoremoval to 3.1, fix autoremove Restore the depcache's MarkRequired logic for 3.0 solver; and change the MarkInstall() call to pass a more correct value for FromUser, to not override an existing automatic status. --- apt-pkg/solver3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 91b852c98..93e4e5116 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -217,10 +217,11 @@ class Solver time_t startTime; /// Various configuration options + std::string version{_config->Find("APT::Solver", "3.0")}; // \brief Debug level int debug{_config->FindI("Debug::APT::Solver")}; // \brief If set, we try to keep automatically installed packages installed. - bool KeepAuto{not _config->FindB("APT::Get::AutomaticRemove")}; + bool KeepAuto{version == "3.0" || not _config->FindB("APT::Get::AutomaticRemove")}; // \brief Determines if we are in upgrade mode. bool IsUpgrade{_config->FindB("APT::Solver::Upgrade", false)}; // \brief If set, removals are allowed. -- cgit v1.2.3-70-g09d2