aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-04-29 12:10:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-04-29 12:11:26 +0300
commit0d10817e8ddcbe91e0826f74a150894f03b8401c (patch)
tree1ae2789da5929d6091e5cc48cab2c4e04b0925c5
parentbd4a189cb8dae25c31ce91f5cd2070765dc45c10 (diff)
Simplify collect_order_dependents()
-rw-r--r--bpkg/pkg-build.cxx24
1 files changed, 7 insertions, 17 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index b58a25d..a562a4e 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -2146,10 +2146,8 @@ namespace bpkg
const map<config_package, bool>* rpt_prereq_flags (nullptr);
// Bail out if this is a configured non-system package and no
- // up/down-grade nor collecting prerequisite replacements are required.
- //
- // NOTE: remember to update the check condition in
- // collect_order_dependents() if changing anything here.
+ // up/down-grade, reconfiguration, nor collecting prerequisite
+ // replacements are required.
//
bool src_conf (sp != nullptr &&
sp->state == package_state::configured &&
@@ -4745,23 +4743,15 @@ namespace bpkg
}
build_package& dp (i->second.package);
- const shared_ptr<selected_package>& dsp (dp.selected);
// There is one tricky aspect: the dependent could be in the
- // process of being up/downgraded as well. In this case all we
- // need to do is detect this situation and skip the test since all
- // the (new) contraints of this package have been satisfied in
- // collect_build().
+ // process of being reconfigured or up/downgraded as well. In this
+ // case all we need to do is detect this situation and skip the
+ // test since all the (new) constraints of this package have been
+ // satisfied in collect_build().
//
if (check)
- {
- check = dp.available == nullptr ||
- (dsp->system () == dp.system &&
- dsp->version == dp.available_version () &&
- (dp.system ||
- dp.config_vars.empty () ||
- !has_buildfile_clause (dp.available->dependencies)));
- }
+ check = !dp.dependencies;
}
if (check)