aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/pkg-build.cxx21
-rw-r--r--tests/pkg-build.testscript3
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