diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-06-14 13:38:03 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-06-14 13:38:11 +0300 |
commit | b149a1a4b7bc404ddad53b9aad5f817b9b72bc8c (patch) | |
tree | bd4c52db14699dc69976bc6409dd8ae65a596725 | |
parent | 9b10547f177eabf6773e20e4f5e7d21db5f3fd5a (diff) |
Always reconfigure dependencies in negotiated configuration clusters
-rw-r--r-- | bpkg/pkg-build.cxx | 21 | ||||
-rw-r--r-- | tests/pkg-build.testscript | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index ffeeaf4..7a3c2f4 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -4646,6 +4646,13 @@ namespace bpkg build_package* b (entered_build (p)); assert (b != nullptr); + // Reconfigure the configured dependencies (see + // collect_build_postponed() for details). + // + if (b->selected != nullptr && + b->selected->state == package_state::configured) + b->flags |= build_package::adjust_reconfigure; + if (!b->recursive_collection) { l5 ([&]{trace << "collecting cfg-postponed dependency " @@ -6173,6 +6180,20 @@ namespace bpkg build_package* b (entered_build (p)); assert (b != nullptr); + // Reconfigure the configured dependencies. + // + // Note that potentially this can be an overkill if the dependency + // configuration doesn't really change. Later we can implement some + // precise detection for that using configuration checksum or + // similar. + // + // Also note that for configured dependents which belong to the + // configuration cluster this flag is already set (see above). + // + if (b->selected != nullptr && + b->selected->state == package_state::configured) + b->flags |= build_package::adjust_reconfigure; + // Skip the dependencies which are already collected recursively. // if (!b->recursive_collection) diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index a220ed1..81179a9 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -5283,6 +5283,7 @@ test.options += --no-progress trace: collect_build_postponed (1): cfg-negotiate end {foo | libfoo->{foo/1,1}}! trace: collect_build_postponed (1): end {foo | libfoo->{foo/1,1}} trace: collect_build_postponed (0): end + %.* trace: execute_plan: simulate: yes %.* EOE @@ -8783,6 +8784,7 @@ test.options += --no-progress trace: collect_build_postponed (2): end {tix | tex->{tix/2,1}} trace: collect_build_postponed (1): end {tix | libbar->{tix/1,1}} trace: collect_build_postponed (0): end + %.* trace: execute_plan: simulate: yes %.* EOE @@ -10877,6 +10879,7 @@ test.options += --no-progress trace: collect_build_postponed (2): end {dix | libbox->{dix/2,1}} trace: collect_build_postponed (1): end {dix | libbar->{dix/1,1}} trace: collect_build_postponed (0): end + %.* trace: execute_plan: simulate: yes %.* EOE |