diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-05 22:06:38 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-14 19:04:56 +0100 |
| commit | 9b8aaaa7abbf36d937dbf7160caa2d9c7c92871f (patch) | |
| tree | 1868ed44e1078a26648ea969c4406bfdcbb8ffc9 /apt-pkg/solver3.cc | |
| parent | b8918cb89ada945d92c720446177f1ef5185b5a5 (diff) | |
solver3: Reject reverse conflicts on install
We forgot this in the previous iteration. This makes the reasoning
in the test cases much nicer and apt-test's mantic-to-noble-jak.edsp
now finishes rather than running into the timeout (potentially forever).
Diffstat (limited to 'apt-pkg/solver3.cc')
| -rw-r--r-- | apt-pkg/solver3.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index 2d9e92c99..8af3275eb 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -382,6 +382,15 @@ bool APT::Solver::Propagate() for (auto &clause : (*this)[var].clauses) if (not AddWork(Work{clause.get(), depth()})) return false; + for (auto rclause : (*this)[var].rclauses) + { + if (not rclause->negative || rclause->optional || rclause->reason.empty()) + continue; + if (unlikely(debug >= 3)) + std::cerr << "Propagate " << var.toString(cache) << " to NOT " << rclause->reason.toString(cache) << " for dep " << const_cast<Clause *>(rclause)->toString(cache) << std::endl; + if (not Enqueue(rclause->reason, false, var)) + return false; + } } else if ((*this)[var].decision == Decision::MUSTNOT) { |
