From dd3889dd21bcb487f7ec6c9198bd44d0da836419 Mon Sep 17 00:00:00 2001 From: Jacob Finkelman Date: Thu, 12 Dec 2024 19:57:20 +0000 Subject: [PATCH] count the packages involved in the root of the conflict --- src/internal/core.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/core.rs b/src/internal/core.rs index 27d03a18..2a82fa13 100644 --- a/src/internal/core.rs +++ b/src/internal/core.rs @@ -166,14 +166,14 @@ impl State { } } if let Some(incompat_id) = conflict_id { - for (p, _) in self.incompatibility_store[incompat_id].iter() { - *self.conflict_count.entry(*p).or_default() += 1; - } let (package_almost, root_cause) = self.conflict_resolution(incompat_id) .map_err(|terminal_incompat_id| { self.build_derivation_tree(terminal_incompat_id) })?; + for (p, _) in self.incompatibility_store[root_cause].iter() { + *self.conflict_count.entry(*p).or_default() += 1; + } self.unit_propagation_buffer.clear(); self.unit_propagation_buffer.push(package_almost); // Add to the partial solution with incompat as cause.