aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-09-02 22:54:21 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-09-25 11:35:25 +0300
commit8226c7c7a2bffc96d70f297e792f3c0afbce67f0 (patch)
tree8ab25697081b67b79586405d60b48ec6d3facd52 /bpkg/pkg-build.cxx
parentf660e1c80e3d44d922705ce2a3bcd0b16f67fcac (diff)
Scratch plan on refinement caused by dependency up/down-grade/drop if any configuration negotiation has been performed
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx13
1 files changed, 13 insertions, 0 deletions
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