diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-03 17:09:16 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-07 20:59:43 +0100 |
| commit | a9aeb31833279bc7482e284da2efcd7b06bc4f3a (patch) | |
| tree | af9cb82db59c550709e728480c3d0ec7772a99b9 /apt-pkg | |
| parent | 466ff3cf0afc5c034ec77868781d8e19e274e7ff (diff) | |
solver3: Early exit when propagating satisfied clauses
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/solver3.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index 87e4babc8..3783aa96e 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -388,6 +388,10 @@ bool APT::Solver::PropagateInstall(Var var) anyMust = true; } + // One is already marked for install, nothing to propagate + if (anyMust) + return true; + if (not anyInstallable) { _error->Error("Conflict: %s -> %s but no versions are installable", @@ -405,10 +409,7 @@ bool APT::Solver::PropagateInstall(Var var) else if (not Enqueue(workItem.solutions[0], true, workItem.reason)) return false; - // FIXME: We skip enqueuing duplicate common dependencies if we already selected a version, but - // we should not have common dependencies duplicated in the version objects anyway. - if (not anyMust && not EnqueueCommonDependencies(Pkg)) - return false; + return EnqueueCommonDependencies(Pkg); } else if (auto Ver = var.Ver(cache); not Ver.end()) { |
