From 8226c7c7a2bffc96d70f297e792f3c0afbce67f0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 2 Sep 2023 22:54:21 +0300 Subject: Scratch plan on refinement caused by dependency up/down-grade/drop if any configuration negotiation has been performed --- bpkg/pkg-build.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bpkg/pkg-build.cxx') diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 1554f01..e2dea9d 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -3867,6 +3867,11 @@ namespace bpkg // grade order where any subsequent entry does not affect the decision of // the previous ones. // + // Note that we also need to rebuild the plan from scratch on adding a new + // up/down-grade/drop if any dependency configuration negotiation has been + // performed, since any package replacement may affect the already + // negotiated configurations. + // // Package managers are an easy, already solved problem, right? // build_packages pkgs; @@ -4916,8 +4921,16 @@ namespace bpkg refine = need_refinement (); + // If no further refinement is necessary, then perform the + // diagnostics run. Otherwise, if any dependency configuration + // negotiation has been performed during the current plan refinement + // iteration, then rebuild the plan from scratch (see above for + // details). + // if (!refine) need_refinement (true /* diag */); + else if (!postponed_cfgs.empty ()) + scratch_exe = true; } // Note that we prevent building multiple instances of the same -- cgit v1.1