From 3ae41a76c19e5ad05600188de43b46c3e2800676 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 11 Feb 2025 22:03:03 +0100 Subject: solver3: Pass EDSP flags directly rather than via config This was a rather silly way to communicate state, and it was in the wrong place. Notably also, multiple calls to the solver had the options sticky, that is, if you run upgrade and then it calls ResolveByKeep(), for example. --- apt-pkg/edsp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/edsp.cc') diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index dd9ae18fc..bf96dd35c 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -756,11 +756,11 @@ bool EDSP::ResolveExternal(const char* const solver, pkgDepCache &Cache, unsigned int const flags, OpProgress *Progress) { if (strstr(solver, "3.") == solver) { - APT::Solver s(Cache.GetCache(), Cache.GetPolicy()); + APT::Solver s(Cache.GetCache(), Cache.GetPolicy(), (EDSP::Request::Flags) flags); FileFd output; bool res = true; if (Progress != NULL) - Progress->OverallProgress(0, 100, 1, _config->FindB("APT::Solver::Upgrade") ? _("Calculating upgrade") : _("Solving dependencies")); + Progress->OverallProgress(0, 100, 1, (flags & EDSP::Request::UPGRADE_ALL) ? _("Calculating upgrade") : _("Solving dependencies")); if (res && not s.FromDepCache(Cache)) res = false; if (Progress != NULL) -- cgit v1.2.3-70-g09d2