From 0d10817e8ddcbe91e0826f74a150894f03b8401c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 29 Apr 2022 12:10:57 +0300 Subject: Simplify collect_order_dependents() --- bpkg/pkg-build.cxx | 24 +++++++----------------- 1 file 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* 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& 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) -- cgit v1.1