summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-25 13:48:14 +0200
committerJulian Andres Klode <jak@debian.org>2025-05-26 12:08:29 +0200
commitb3acf5ffb28b26f7766cf4eac9b9553a3f118bff (patch)
tree17b44602139c389a49913b8c9686206f76e4ff10 /apt-pkg
parent822c979d5e010e24e513875b608d1f68daaeced4 (diff)
solver3: If no choice was made nothing to invert
We sometimes enqueue no choice as the choice, specifically when an optional clause became unsat as we need to reenqueue it on undo. But of course, this breaks undoing stuff because now it tries to insert !root and then solver breaks.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/solver3.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc
index 3e2f53a26..749633d52 100644
--- a/apt-pkg/solver3.cc
+++ b/apt-pkg/solver3.cc
@@ -983,7 +983,7 @@ bool APT::Solver::Pop()
std::cerr << "Backtracking to choice " << choice.toString(cache) << "\n";
// FIXME: There should be a reason!
- if (not Enqueue(choice, false, {}))
+ if (not choice.empty() && not Enqueue(choice, false, {}))
return false;
if (unlikely(debug >= 2))