aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build-collect.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-11-15 22:11:03 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-11-17 17:10:48 +0300
commitbee8c4afc182e20de9b7e7bd907bee72cfa55889 (patch)
treeac4e4f1a61e81422a0e7487cfe592678ebdce169 /bpkg/pkg-build-collect.hxx
parent789f4c5666fed11bbc6d95ff537872df49134ebc (diff)
Fix pkg-build by ignoring version replacement if it doesn't satisfy dependency constraints
Diffstat (limited to 'bpkg/pkg-build-collect.hxx')
-rw-r--r--bpkg/pkg-build-collect.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx
index 86878f0..ece3d90 100644
--- a/bpkg/pkg-build-collect.hxx
+++ b/bpkg/pkg-build-collect.hxx
@@ -1236,8 +1236,15 @@ namespace bpkg
// replaced with the drop. So can be used as bool.
//
// Consult replaced_vers for an existing version replacement entry and
- // follow it, if present, potentially collecting the package drop
- // instead. Add entry to replaced_vers and throw replace_version if the
+ // follow it, if present, potentially collecting the package drop instead.
+ // Ignore the entry if its version doesn't satisfy the dependency
+ // constraints specified by the caller. In this case it's likely that this
+ // replacement will be applied for some later collect_build() call but can
+ // potentially turn out bogus. Note that a version replacement for a
+ // specific package may only be applied once during the collection
+ // iteration.
+ //
+ // Add entry to replaced_vers and throw replace_version if the
// existing version needs to be replaced but the new version cannot be
// re-collected recursively in-place (see replaced_versions for details).
//