diff options
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/solver3.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index d9ed1a7bb..3511132dd 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -273,8 +273,12 @@ inline APT::Solver::Var APT::Solver::bestReason(APT::Solver::Clause const *claus return Var{}; if (clause->reason == var) for (auto choice : clause->solutions) - if ((*this)[choice].decision != Decision::NONE) + { + if (clause->negative && (*this)[choice].decision == Decision::MUST) + return choice; + if (not clause->negative && (*this)[choice].decision == Decision::MUSTNOT) return choice; + } return clause->reason; } |
