summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-11 22:03:03 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:08:45 +0100
commit3ae41a76c19e5ad05600188de43b46c3e2800676 (patch)
tree338626cb24601c36be38990408b9c15679d04083 /apt-pkg/edsp.cc
parentfdc8682db546077cb24b2cc8861b2d5e4eee9da5 (diff)
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.
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc4
1 files changed, 2 insertions, 2 deletions
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)