diff options
-rw-r--r-- | bpkg/pkg-build.cxx | 501 | ||||
-rw-r--r-- | tests/common/dependency-alternatives/t11a/bar-0.1.0.tar.gz | bin | 0 -> 462 bytes | |||
-rw-r--r-- | tests/common/dependency-alternatives/t11a/baz-0.1.0.tar.gz | bin | 0 -> 421 bytes | |||
-rw-r--r-- | tests/common/dependency-alternatives/t11a/libbar-0.1.0.tar.gz | bin | 0 -> 409 bytes | |||
-rw-r--r-- | tests/pkg-build.testscript | 506 |
5 files changed, 651 insertions, 356 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 0ef6889..1d814b7 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -740,6 +740,33 @@ namespace bpkg ""}) != required_by.end (); } + // Return true if the configured package needs to be recollected + // recursively. + // + // This is required if it is being built as a source package and needs to + // be up/down-graded and/or reconfigured, it is a repointed dependent, or + // it is already in the process of being collected. + // + bool + recollect_recursively (const repointed_dependents& rpt_depts) const + { + assert (action && + *action == build_package::build && + available != nullptr && + selected != nullptr && + selected->state == package_state::configured && + selected->substate != package_substate::system); + + config_package cp (db, name ()); + + return !system && + (dependencies || + selected->version != available_version () || + (!config_vars.empty () && + has_buildfile_clause (available->dependencies)) || + rpt_depts.find (cp) != rpt_depts.end ()); + } + // State flags. // uint16_t flags; @@ -1222,8 +1249,8 @@ namespace bpkg bool existing; small_vector<dependency, 1> dependencies; - const dependency* - find_dependency (const pair<size_t, size_t>& pos) const + dependency* + find_dependency (pair<size_t, size_t> pos) { auto i (find_if (dependencies.begin (), dependencies.end (), @@ -1233,15 +1260,33 @@ namespace bpkg })); return i != dependencies.end () ? &*i : nullptr; } + + void + add (dependency&& dep) + { + if (dependency* d = find_dependency (dep.position)) + { + // Feels like we can accumulate dependencies into an existing + // position only for an existing dependent. + // + assert (existing); + + for (config_package& p: dep) + { + // Add the dependency unless it's already there. + // + if (find (d->begin (), d->end (), p) == d->end ()) + d->push_back (move (p)); + } + } + else + dependencies.push_back (move (dep)); + } }; using dependents_map = map<config_package, dependent_info>; using dependencies_set = set<config_package>; - // Note that for a cluster based on an existing dependent, only - // dependencies will contain elements with dependents being empty. - // @@ TODO: probably no longer the case. - // dependents_map dependents; dependencies_set dependencies; @@ -1277,10 +1322,16 @@ namespace bpkg // Add dependency of an existing dependent. // - postponed_configuration (size_t i, config_package&& dependency) + postponed_configuration (size_t i, + config_package&& dependent, + pair<size_t, size_t> position, + config_package&& dep) : id (i) { - dependencies.emplace (move (dependency)); + add (move (dependent), + true /* existing */, + position, + packages ({move (dep)})); } void @@ -1299,17 +1350,7 @@ namespace bpkg { dependent_info& ddi (i->second); - const dependency* dep (ddi.find_dependency (position)); - - // @@ Feels like that for existing we may accumulate them one by one - // (and below). - // - if (dep == nullptr) - ddi.dependencies.push_back (dependency (position, move (deps))); - else - // If present, must contain the same dependency packages. - // - assert (static_cast<const packages&> (*dep) == deps); + ddi.add (dependency (position, move (deps))); // Conceptually we can only move from existing to non-existing (e.g., // due to a upgrade/downgrade later). But that case is handled via @@ -1382,27 +1423,15 @@ namespace bpkg if (i != dependents.end ()) { - dependent_info& ddi (i->second); - dependent_info& sdi (d.second); + dependent_info& ddi (i->second); // Destination dependent info. + dependent_info& sdi (d.second); // Source dependent info. for (dependency& sd: sdi.dependencies) - { - const dependency* dep (ddi.find_dependency (sd.position)); - - // @@ Feels like that for existing we may accumulate them one by - // one (and above). - // - if (dep == nullptr) - ddi.dependencies.push_back (move (sd)); - else - // If present, must contain the same dependency packages. - // - assert (static_cast<const packages&> (*dep) == sd); - } + ddi.add (move (sd)); // As in add() above. // - assert (ddi.existing == existing); + assert (ddi.existing == sdi.existing); } else dependents.emplace (d.first, move (d.second)); @@ -1518,13 +1547,6 @@ namespace bpkg return false; } - bool - existing_dependent (const config_package& cp) const - { - auto i (dependents.find (cp)); - return i != dependents.end () && i->second.existing; - } - // Return the postponed configuration string representation in the form: // // {<dependent>[ <dependent>]* | <dependency>[ <dependency>]*}['!'|'?'] @@ -1857,11 +1879,16 @@ namespace bpkg return make_pair (ref (*ri), optional<bool> (rb)); } - // Add new postponed configuration cluster with a single dependency and no - // dependent. + // Add new postponed configuration cluster with a single dependency of an + // existing dependent. + // + // Note that it's the caller's responsibility to make sure that the + // dependency doesn't already belong to any existing cluster. // void - add (config_package dependency) + add (config_package dependent, + pair<size_t, size_t> position, + config_package dependency) { tracer trace ("postponed_configurations::add"); @@ -1876,6 +1903,8 @@ namespace bpkg i = insert_after (i, postponed_configuration (next_id_++, + move (dependent), + position, move (dependency))); l5 ([&]{trace << "create " << *i;}); @@ -1922,18 +1951,6 @@ namespace bpkg return true; } - bool - existing_dependent (const config_package& cp) const - { - for (const postponed_configuration& cfg: *this) - { - if (cfg.existing_dependent (cp)) - return true; - } - - return false; - } - // Translate index to iterator and return the referenced configuration. // postponed_configuration& @@ -2618,6 +2635,9 @@ namespace bpkg // bool force_configured = false) { + // NOTE: don't forget to update collect_build_postponed() if changing + // anything in this function. + // tracer trace ("collect_build_prerequisites"); assert (pkg.action && *pkg.action == build_package::build); @@ -2635,42 +2655,57 @@ namespace bpkg // dependency of any dependent with configuration clause and postpone // the collection if that's the case. // - // Note that while we know exactly what the package dependents are, at - // this point we don't know which dependency alternatives are resolved - // to this package and what clauses they have. This will be determined - // during the negotiation while re-collecting recursively the existing - // dependents and, actually, can turn out to be redundant if the - // dependency gets resolved through some other dependency alternative - // without configuration clause, but it should be harmless. - // - // Also note that alternatively/in the future we could just store (in - // the database) a flag indicating if the prerequisite's dependency - // alternative has any configuration clauses. - // if (!pkg.recursive_collection && pkg.reconfigure () && postponed_cfgs.find_dependency (cp) == nullptr) { vector<existing_dependent> eds ( query_existing_dependents (trace, - options, pdb, nm, replaced_vers, - postponed_deps)); + rpt_depts)); if (!eds.empty ()) { - existing_dependent& ed (eds.front ()); + for (existing_dependent& ed: eds) + { + // @@ Here we need to first check if for this dependent there is a + // record in the postponed_poss (not yet invented; any better + // name?) map. If the record exists and the dependency position + // is greater that the stored position, then we skip this + // dependent. Otherwise, we need to check if this existing + // dependent is already present in some non-negotiated + // cluster. If it doesn't then just create the cluster and bail + // out. Otherwise, if the dependency position is greater than + // that one in the cluster for this dependent, then skip this + // dependent. Otherwise, if the position is less, then note + // this position in this map and start from scratch. Otherwise + // (the position is equal), just add the dependency to the + // existing cluster. + // + // Note that we also need to think if any such entries could + // become bogus (and if we believe not, then assert so). + // + l5 ([&]{trace << "cfg-postpone dependency " + << pkg.available_name_version_db () + << " of existing dependent " << *ed.selected + << ed.db;}); - l5 ([&]{trace << "cfg-postpone dependency " - << pkg.available_name_version_db () - << " of existing dependent " << *ed.selected - << ed.db;}); + postponed_cfgs.add (config_package (ed.db, ed.selected->name), + ed.dependency_position, + move (cp)); - postponed_cfgs.add (move (cp)); - return; + return; + } } + + // @@ TODO: we also need to do the same position check of "previously + // existing" dependents: those that are sitting in the + // postponed_cfgs clusters with existing flag (not clear if we + // should only look in negotiated or all clusters -- feels like if + // the cluster is still not negotiated then the dependent is still + // existing). } pkg.recursive_collection = true; @@ -2690,9 +2725,13 @@ 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, reconfiguration, nor collecting prerequisite - // replacements are required. + // Bail out if this is a configured non-system package and no recursive + // collection is required nor the collection is forced. + // + // @@ TMP Forcing collection will probably be gone when we implement + // complete negotiation implementation since we will recognize the + // need to recollect by the presence of the respective config vars, + // etc. // bool src_conf (sp != nullptr && sp->state == package_state::configured && @@ -2705,17 +2744,7 @@ namespace bpkg if (i != rpt_depts.end ()) rpt_prereq_flags = &i->second; - if (!ud && - rpt_prereq_flags == nullptr && - (pkg.config_vars.empty () || - !has_buildfile_clause (ap->dependencies)) && - !postponed_cfgs.existing_dependent (cp) && - // - // @@ TMP This will probably be gone when we implement complete - // negotiation implementation since we will recognize that by - // the presence of the respective config vars, etc. - // - !force_configured) + if (!force_configured && !pkg.recollect_recursively (rpt_depts)) { l5 ([&]{trace << "skip configured " << pkg.available_name_version_db ();}); @@ -4014,7 +4043,7 @@ namespace bpkg for (const config_package& p: cfg_deps) { build_package* b (entered_build (p)); - assert (b != nullptr); // @@ TMP + assert (b != nullptr); if (!b->recursive_collection) { @@ -4035,7 +4064,8 @@ namespace bpkg postponed_alts, 0 /* max_alt_index */, postponed_deps, - postponed_cfgs); + postponed_cfgs, + true /* force_configured */); } else l5 ([&]{trace << "dependency " @@ -4557,6 +4587,8 @@ namespace bpkg replaced_vers.erase (vi); vi = replaced_vers.end (); // Keep it valid for the below check. } + else + v.replaced = true; } build_package p { @@ -4849,50 +4881,90 @@ namespace bpkg // case pcfg pointer will be invalidated which we will need to // handle somehow. // - // @@ TMP For now, instead of the proper re-evaluation, just add these - // dependents to this cluster using position 1 for their - // dependencies. Note that it will not cause merge since the - // dependencies are all in this cluster already. - // - // Map such dependents to the dependencies it applies configuration - // to. Also, collect the information which is required for a dependent - // re-evaluation and its subsequent recursive collection. - // { - struct dependent_info + // Map existing dependents to the dependencies they apply a + // configuration to. Also, collect the information which is required + // for a dependent re-evaluation and its subsequent recursive + // collection (selected package, etc). + // + struct existing_dependent_ex: existing_dependent { - shared_ptr<selected_package> selected; - shared_ptr<available_package> available; - lazy_shared_ptr<bpkg::repository_fragment> repository_fragment; - packages dependencies; - }; + packages dependencies; - map<config_package, dependent_info> dependents; + existing_dependent_ex (existing_dependent&& ed) + : existing_dependent (move (ed)) {} + }; + map<config_package, existing_dependent_ex> dependents; for (const config_package& p: pcfg->dependencies) { for (existing_dependent& ed: query_existing_dependents (trace, - o, p.db, p.name, replaced_vers, - postponed_deps)) + rpt_depts)) { config_package cp (ed.db, ed.selected->name); - auto i ( - dependents.emplace (move (cp), - dependent_info { - move (ed.selected), - move (ed.available), - move (ed.repository_fragment), - postponed_configuration::packages ()})); + // If this dependent is present in postponed_deps, then it means + // someone depends on it with configuration and it's no longer + // considered an existing dependent (it will be reconfigured). + // However, this fact may not be reflected yet. And it can + // actually turn out bogus. + // + auto pi (postponed_deps.find (cp)); + if (pi != postponed_deps.end ()) + { + l5 ([&]{trace << "skip dep-postponed existing dependent " << cp + << " of dependency " << p;}); + + // Note that here we would re-evaluate the existing dependent + // without specifying any configuration for it. + // + pi->second.wout_config = true; + + continue; + } + + // If the existing dependent is not in the map yet, then add it. + // Otherwise, if the dependency position is greater than that + // one in the existing map entry then skip it (this position + // will be up-negotiated, if it's still present). Otherwise, if + // the position is less then overwrite the existing entry. + // Otherwise (the position is equal), just add the dependency to + // the existing entry. + // + // Note that we want to re-evaluate the dependent up to the + // earliest dependency position and continue with the regular + // prerequisites collection (as we do for new dependents) + // afterwards. + // + auto i (dependents.find (cp)); + if (i == dependents.end ()) + { + i = dependents.emplace ( + move (cp), existing_dependent_ex (move (ed))).first; + } + else + { + size_t di1 (i->second.dependency_position.first); + size_t di2 (ed.dependency_position.first); + + if (di1 < di2) + continue; + else if (di1 > di2) + i->second = existing_dependent_ex (move (ed)); + //else if (di1 == di2) + // ; + } - i.first->second.dependencies.push_back (p); + i->second.dependencies.push_back (p); } } + // Re-evaluate existing dependents. + // if (!dependents.empty ()) { l5 ([&]{trace << "re-evaluate existing dependents for " << *pcfg;}); @@ -4900,15 +4972,19 @@ namespace bpkg for (auto& d: dependents) { config_package cp (d.first); - dependent_info& di (d.second); - postponed_configuration::packages& ds (di.dependencies); + existing_dependent_ex& ed (d.second); + packages& ds (ed.dependencies); + + pair<shared_ptr<available_package>, + lazy_shared_ptr<repository_fragment>> rp ( + find_available_fragment (o, cp.db, ed.selected)); build_package p { build_package::build, cp.db, - move (di.selected), - move (di.available), - move (di.repository_fragment), + move (ed.selected), + move (rp.first), + move (rp.second), nullopt, // Dependencies. nullopt, // Dependencies alternatives. nullopt, // Package skeleton. @@ -4931,37 +5007,43 @@ namespace bpkg // Note: not recursive. // - build_package* b (collect_build (o, - move (p), - fdb, - rpt_depts, - apc, - true /* initial_collection */, - replaced_vers)); + collect_build (o, + move (p), + fdb, + rpt_depts, + apc, + true /* initial_collection */, + replaced_vers); + build_package* b (entered_build (cp)); assert (b != nullptr); - // @@ Re-evaluate up-to the cluster's dependencies. + // @@ Re-evaluate up-to the earliest position. // @@ TMP: need proper implementation. // + // @@ TODO: fail if we do not "arrive" at this position. + // { // @@ This emulates collect_build_prerequisites() called for // the first time and postponing the first dependency - // alternative. + // alternative. See collect_build_prerequisites() for + // details. // if (postponed_cfgs.find_dependency (cp) == nullptr) { vector<existing_dependent> eds ( query_existing_dependents (trace, - o, b->db, b->name (), replaced_vers, - postponed_deps)); + rpt_depts)); if (!eds.empty ()) { + // @@ NOTE: doesn't really repeat the latest + // implementation in collect_build_prerequisites(). + // existing_dependent& ed (eds.front ()); l5 ([&]{trace << "cfg-postpone dependency " @@ -4969,7 +5051,10 @@ namespace bpkg << " of existing dependent " << *ed.selected << ed.db;}); - postponed_cfgs.add (cp); + postponed_cfgs.add ( + config_package (ed.db, ed.selected->name), + ed.dependency_position, + cp); // @@ Note that collect_build_prerequisites() returns here // while we continue. Is that right? @@ -4990,26 +5075,43 @@ namespace bpkg ? dir_path (b->db.get ().config) /= b->name ().string () : optional<dir_path> ()); + const shared_ptr<available_package>& ap (b->available); + b->skeleton = package_skeleton (o, b->db, - *b->available, + *ap, b->config_vars, move (src_root), move (out_root)); - build_package::dependency_alternatives_refs edas; + const auto& pos (ed.dependency_position); + + assert (pos.first != 0 && pos.second != 0); + + size_t di (pos.first - 1); + size_t dai (pos.second - 1); - edas.push_back ( - make_pair (ref (b->available->dependencies[0][0]), 0)); + assert (di < ap->dependencies.size () && + dai < ap->dependencies[di].size ()); + + const dependency_alternative& da (ap->dependencies[di][dai]); + + build_package::dependency_alternatives_refs edas; + edas.push_back (make_pair (ref (da), dai)); b->postponed_dependency_alternatives = move (edas); - // @@ TODO: may already exist in the map. Could it be that - // the positions are different? + // Note: the dependent may already exist in the cluster + // with a subset of dependencies. + // + // @@ TODO: we actually need to pass packages from da (all + // dependencies) instead of ds (only postponed + // dependencies). That's not easy to emulate at the moment + // so let's do as a part of the proper implementation. // postponed_cfgs.add (move (cp), true /* existing */, - make_pair (1, 1), + pos, move (ds)); } } @@ -5941,32 +6043,29 @@ namespace bpkg } private: - // Return the list of existing dependents that potentially has a - // configuration clause for the specified dependency. Skip dependents - // which are being built or dropped (present in the map) or expected to be - // built or dropped (present in replaced_vers). + // Return the list of existing dependents that has a configuration clause + // for the specified dependency. Skip dependents which are being built and + // require recursive recollection or dropped (present in the map) or + // expected to be built or dropped (present in replaced_vers). // struct existing_dependent { reference_wrapper<database> db; shared_ptr<selected_package> selected; - shared_ptr<available_package> available; - - // Can be NULL (orphan). - // - lazy_shared_ptr<bpkg::repository_fragment> repository_fragment; + pair<size_t, size_t> dependency_position; }; vector<existing_dependent> query_existing_dependents (tracer& trace, - const pkg_build_options& options, database& db, const package_name& name, const replaced_versions& replaced_vers, - postponed_dependencies& /*postponed_deps*/) + const repointed_dependents& rpt_depts) { vector<existing_dependent> r; + lazy_shared_ptr<selected_package> sp (db, name); + for (database& ddb: db.dependent_configs ()) { for (auto& pd: query_dependents (ddb, name, db)) @@ -5974,53 +6073,12 @@ namespace bpkg shared_ptr<selected_package> dsp ( ddb.load<selected_package> (pd.name)); - pair<shared_ptr<available_package>, - lazy_shared_ptr<repository_fragment>> rp ( - find_available_fragment (options, ddb, dsp)); + auto i (dsp->prerequisites.find (sp)); + assert (i != dsp->prerequisites.end ()); - shared_ptr<available_package>& dap (rp.first); + const auto& pos (i->second.config_position); - // See it this dependent potentially configures the specified - // dependency and add it to the resulting list if that's the case. - // - bool conf (false); - for (const dependency_alternatives& das: dap->dependencies) - { - // Note that we also need to consider the dependency's - // build-time flag and check if the package can be resolved as a - // dependency via this specific depends manifest value (think of - // unlikely but possible situation that a dependent depends both - // runtime and build-time on the same dependency). - // - linked_databases ddbs ( - ddb.dependency_configs (name, das.buildtime)); - - if (find (ddbs.begin (), ddbs.end (), db) == ddbs.end ()) - continue; - - for (const dependency_alternative& da: das) - { - if (da.prefer || da.require) - { - for (const dependency& d: da) - { - if (d.name == name) - { - conf = true; - break; - } - } - - if (conf) - break; - } - } - - if (conf) - break; - } - - if (conf) + if (pos.first != 0) // Has config clause? { config_package cp (ddb, pd.name); @@ -6028,16 +6086,18 @@ namespace bpkg // const build_package* p (entered_build (cp)); - bool build; - if (p != nullptr && - p->action && - ((build = (*p->action == build_package::build)) || - *p->action == build_package::drop)) + if (p != nullptr && p->action) { - l5 ([&]{trace << "skip being " << (build ? "built" : "dropped") - << " existing dependent " << cp - << " of dependency " << name << db;}); - continue; + bool build; + if (((build = *p->action == build_package::build) && + p->recollect_recursively (rpt_depts)) || + *p->action == build_package::drop) + { + l5 ([&]{trace << "skip being " << (build ? "built" : "dropped") + << " existing dependent " << cp + << " of dependency " << name << db;}); + continue; + } } // Ignore dependent which is expected to be built or dropped. @@ -6055,28 +6115,7 @@ namespace bpkg continue; } - // @@ Note that at this point we actually don't know for sure if - // this dependency is configured by the dependent or not. Thus, - // we don't how which flag to set. Seems we shouldn't skip it - // here and check during existing dependent re-evaluation or - // smth. - // -#if 0 - auto pi (postponed_deps.find (cp)); - if (pi != postponed_deps.end ()) - { - l5 ([&]{trace << "skip dep-postponed existing dependent " << cp - << " of dependency " << name << db;}); - - pi->second.wout_config = true; - - continue; - } -#endif - r.push_back (existing_dependent {ddb, - move (dsp), - move (dap), - move (rp.second)}); + r.push_back (existing_dependent {ddb, move (dsp), pos}); } } } diff --git a/tests/common/dependency-alternatives/t11a/bar-0.1.0.tar.gz b/tests/common/dependency-alternatives/t11a/bar-0.1.0.tar.gz Binary files differnew file mode 100644 index 0000000..34774a8 --- /dev/null +++ b/tests/common/dependency-alternatives/t11a/bar-0.1.0.tar.gz diff --git a/tests/common/dependency-alternatives/t11a/baz-0.1.0.tar.gz b/tests/common/dependency-alternatives/t11a/baz-0.1.0.tar.gz Binary files differnew file mode 100644 index 0000000..a1f37b0 --- /dev/null +++ b/tests/common/dependency-alternatives/t11a/baz-0.1.0.tar.gz diff --git a/tests/common/dependency-alternatives/t11a/libbar-0.1.0.tar.gz b/tests/common/dependency-alternatives/t11a/libbar-0.1.0.tar.gz Binary files differnew file mode 100644 index 0000000..57b9ccc --- /dev/null +++ b/tests/common/dependency-alternatives/t11a/libbar-0.1.0.tar.gz diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 2e129fb..1977d56 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -174,6 +174,7 @@ # |-- t11a # | |-- libfoo-0.1.0.tar.gz # | |-- libfoo-1.0.0.tar.gz +# | |-- libbar-0.1.0.tar.gz # | |-- libbar-1.0.0.tar.gz # | |-- libbaz-1.0.0.tar.gz # | |-- libbox-1.0.0.tar.gz @@ -182,7 +183,9 @@ # | |-- fux-1.0.0.tar.gz -> libfoo # | |-- fix-1.0.0.tar.gz -> foo {require {config.foo.extras=true}} # | |-- fex-1.0.0.tar.gz -> foo, libfoo {require {config.libfoo.extras=true}} +# | |-- bar-0.1.0.tar.gz -> libbar == 0.1.0 {require {config.libbar.extras=true}} # | |-- bar-1.0.0.tar.gz -> libbar {require {config.libbar.extras=true}} +# | |-- baz-0.1.0.tar.gz -> {libbar libfoo} == 0.1.0 {require {config.libbar.extras=true config.libfoo.extras=true}} # | |-- baz-1.0.0.tar.gz -> {libbar libfoo} {require {config.libbar.extras=true config.libfoo.extras=true}} # | |-- box-1.0.0.tar.gz -> {libbar libfoo} {require {config.libbar.extras=true config.libfoo.extras=true}} | # | | libbox @@ -5284,7 +5287,7 @@ test.options += --no-progress $pkg_drop foo libfoo } - : dependent + : dependent-single-position : { $clone_cfg; @@ -5331,14 +5334,14 @@ test.options += --no-progress trace: pkg_build: refine package collection/plan execution %.* trace: collect_build_prerequisites: cfg-postpone dependency libfoo/0.1.0 of existing dependent foo/1.0.0 - trace: postponed_configurations::add: create { | libfoo->{}} + trace: postponed_configurations::add: create {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin { | libfoo->{}} + trace: collect_build_postponed (1): begin {foo^ | libfoo->{foo/1,1}} %.* - trace: collect_build_postponed (1): re-evaluate existing dependents for { | libfoo->{}} + trace: collect_build_postponed (1): re-evaluate existing dependents for {foo^ | libfoo->{foo/1,1}} trace: collect_build: add foo/1.0.0 %.* - trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to { | libfoo->{}} + trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): cfg-negotiate begin {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies trace: collect_build_prerequisites: begin libfoo/0.1.0 @@ -5348,7 +5351,7 @@ test.options += --no-progress trace: collect_build_prerequisites: resume foo/1.0.0 trace: collect_build_prerequisites: end foo/1.0.0 trace: collect_build_postponed (1): cfg-negotiate end {foo^ | libfoo->{foo/1,1}}! - trace: collect_build_postponed (1): end { | libfoo->{}} + trace: collect_build_postponed (1): end {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): end %.* trace: execute_plan: simulate: yes @@ -5364,14 +5367,15 @@ test.options += --no-progress trace: collect_build: add libfoo/0.1.0 %.* trace: collect_build_prerequisites: cfg-postpone dependency libfoo/0.1.0 of existing dependent foo/1.0.0 - trace: postponed_configurations::add: create { | libfoo->{}} + trace: postponed_configurations::add: create {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin { | libfoo->{}} + trace: collect_build_postponed (1): begin {foo^ | libfoo->{foo/1,1}} + %.* + trace: collect_build_postponed (1): re-evaluate existing dependents for {foo^ | libfoo->{foo/1,1}} %.* - trace: collect_build_postponed (1): re-evaluate existing dependents for { | libfoo->{}} trace: collect_build: add foo/1.0.0 %.* - trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to { | libfoo->{}} + trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): cfg-negotiate begin {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies trace: collect_build_prerequisites: begin libfoo/0.1.0 @@ -5381,7 +5385,7 @@ test.options += --no-progress trace: collect_build_prerequisites: resume foo/1.0.0 trace: collect_build_prerequisites: end foo/1.0.0 trace: collect_build_postponed (1): cfg-negotiate end {foo^ | libfoo->{foo/1,1}}! - trace: collect_build_postponed (1): end { | libfoo->{}} + trace: collect_build_postponed (1): end {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): end %.* trace: execute_plan: simulate: yes @@ -5403,13 +5407,13 @@ test.options += --no-progress trace: collect_build: add libfoo/1.0.0 %.* trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of existing dependent foo/1.0.0 - trace: postponed_configurations::add: create { | libfoo->{}} + trace: postponed_configurations::add: create {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin { | libfoo->{}} + trace: collect_build_postponed (1): begin {foo^ | libfoo->{foo/1,1}} %.* - trace: collect_build_postponed (1): re-evaluate existing dependents for { | libfoo->{}} + trace: collect_build_postponed (1): re-evaluate existing dependents for {foo^ | libfoo->{foo/1,1}} %.* - trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to { | libfoo->{}} + trace: postponed_configurations::add: add {foo^ 1,1: libfoo} to {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): cfg-negotiate begin {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies trace: collect_build_prerequisites: begin libfoo/1.0.0 @@ -5419,7 +5423,7 @@ test.options += --no-progress trace: collect_build_prerequisites: resume foo/1.0.0 trace: collect_build_prerequisites: end foo/1.0.0 trace: collect_build_postponed (1): cfg-negotiate end {foo^ | libfoo->{foo/1,1}}! - trace: collect_build_postponed (1): end { | libfoo->{}} + trace: collect_build_postponed (1): end {foo^ | libfoo->{foo/1,1}} trace: collect_build_postponed (0): end %.* trace: execute_plan: simulate: yes @@ -5439,29 +5443,6 @@ test.options += --no-progress trace: collect_build_prerequisites: begin libfoo/1.0.0 trace: collect_build_prerequisites: end libfoo/1.0.0 trace: collect_drop: overwrite foo - trace: pkg_build: erase bogus version replacement foo - trace: pkg_build: bogus version replacement erased, throwing - trace: pkg_build: collection failed due to bogus version replacement cancellation, retry from scratch - %.* - trace: pkg_build: refine package collection/plan execution from scratch - %.* - trace: collect_build: add libfoo/1.0.0 - %.* - trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of existing dependent foo/1.0.0 - trace: postponed_configurations::add: create { | libfoo->{}} - trace: collect_drop: overwrite foo - trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin { | libfoo->{}} - %.* - trace: collect_build_postponed (1): skip being dropped existing dependent foo of dependency libfoo - trace: collect_build_postponed (1): cfg-negotiate begin { | libfoo->{}} - trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies - trace: collect_build_prerequisites: begin libfoo/1.0.0 - trace: collect_build_prerequisites: end libfoo/1.0.0 - trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents - trace: collect_build_postponed (1): cfg-negotiate end { | libfoo->{}}! - trace: collect_build_postponed (1): end { | libfoo->{}} - trace: collect_build_postponed (0): end %.* trace: execute_plan: simulate: yes %.* @@ -5473,6 +5454,55 @@ test.options += --no-progress $pkg_drop libfoo } + + : dependent-multiple-positions + : + if false + { + +$clone_cfg + + # Dependencies: + # + # tex: depends: libbar(c) + # depends: libfoo(c) + # + # bar: depends: libbar == 0.1.0 (c) + # + # baz: depends: {libbar libfoo} == 0.1.0 (c) + + : non-negotiated + : + { + $clone_cfg; + + $* tex 2>!; + + $* libfoo/0.1.0 libbar/0.1.0 2>>~%EOE% + EOE + } + + : negotiated + : + { + $clone_cfg; + + $* tex 2>!; + + $* libfoo/0.1.0 bar/0.1.0 2>>~%EOE% + EOE + } + + : re-evaluating-dependent + : + { + $clone_cfg; + + $* tex 2>!; + + $* baz/0.1.0 2>>~%EOE% + EOE + } + } } : postponed-collection @@ -7052,7 +7082,6 @@ test.options += --no-progress : args-tex-tix : - if false { $clone_cfg; @@ -7082,7 +7111,7 @@ test.options += --no-progress trace: postponed_configurations::add: add {tix 1,1: libbar} to {tex | libbar->{tex/1,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin + trace: collect_build_postponed (1): begin {tex tix | libbar->{tex/1,1 tix/1,1}} %.* trace: collect_build_postponed (1): cfg-negotiate begin {tex tix | libbar->{tex/1,1 tix/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies @@ -7114,7 +7143,7 @@ test.options += --no-progress trace: postponed_configurations::add: create {tix | libbar->{tix/1,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin + trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} %.* trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies @@ -7128,7 +7157,7 @@ test.options += --no-progress trace: postponed_configurations::add: create {tix | tex->{tix/2,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1,1}}! - trace: collect_build_postponed (2): begin + trace: collect_build_postponed (2): begin {tix | tex->{tix/2,1}} %.* trace: collect_build_postponed (2): cfg-negotiate begin {tix | tex->{tix/2,1}} trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies @@ -7138,7 +7167,7 @@ test.options += --no-progress trace: postponed_configurations::add: add {tex 1,1: libbar} to {tix | libbar->{tix/1,1}}! trace: collect_build_prerequisites: cfg-postponing dependent tex/1.0.0 involves negotiated configurations and results in {tex tix | libbar->{tex/1,1 tix/1,1}}!, throwing retry_configuration trace: collect_build_postponed (0): cfg-negotiation of {tix | libbar->{tix/1,1}} failed due to dependent tex, adding shadow dependent and re-negotiating - trace: collect_build_postponed (1): begin + trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} %.* trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies @@ -7152,7 +7181,7 @@ test.options += --no-progress trace: postponed_configurations::add: create {tix | tex->{tix/2,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1,1}}! - trace: collect_build_postponed (2): begin + trace: collect_build_postponed (2): begin {tix | tex->{tix/2,1}} %.* trace: collect_build_postponed (2): cfg-negotiate begin {tix | tex->{tix/2,1}} trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies @@ -7173,7 +7202,7 @@ test.options += --no-progress trace: collect_build_prerequisites: resume tix/1.0.0 trace: collect_build_prerequisites: end tix/1.0.0 trace: collect_build_postponed (2): cfg-negotiate end {tix | tex->{tix/2,1}}! - trace: collect_build_postponed (3): begin + trace: collect_build_postponed (3): begin {tex | libfoo->{tex/2,1}} %.* trace: collect_build_postponed (3): cfg-negotiate begin {tex | libfoo->{tex/2,1}} trace: collect_build_postponed (3): recursively collect cfg-negotiated dependencies @@ -7184,9 +7213,9 @@ test.options += --no-progress trace: collect_build_prerequisites: resume tex/1.0.0 trace: collect_build_prerequisites: end tex/1.0.0 trace: collect_build_postponed (3): cfg-negotiate end {tex | libfoo->{tex/2,1}}! - trace: collect_build_postponed (3): end - trace: collect_build_postponed (2): end - trace: collect_build_postponed (1): end + trace: collect_build_postponed (3): end {tex | libfoo->{tex/2,1}} + 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 %.* @@ -7211,7 +7240,6 @@ test.options += --no-progress : As above but with the different command-line arguments which results : in the different cluster list at the moment of the cycle detection. : - if false { $clone_cfg; @@ -7223,16 +7251,7 @@ test.options += --no-progress # tix: depends: libbar(c) # depends: tex(c) # - # Configuration clusters: - # - # {tix | libbar->{tix/1}} - # {tix | tex->{tix/2}} - # - # Fail at: - # - # tex -> libbar - # - $* tix 2>>~%EOE% != 0 + $* tix 2>>~%EOE%; %.* trace: pkg_build: refine package collection/plan execution from scratch %.* @@ -7241,57 +7260,314 @@ test.options += --no-progress %.* trace: collect_build: add libbar/1.0.0 trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tix/1.0.0 - trace: postponed_configurations::add: create {tix | libbar->{tix/1}} + trace: postponed_configurations::add: create {tix | libbar->{tix/1,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin + trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} %.* - trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1}} + trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies trace: collect_build_prerequisites: begin libbar/1.0.0 trace: collect_build_prerequisites: end libbar/1.0.0 trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tix/1.0.0 trace: collect_build_prerequisites: resume tix/1.0.0 %.* - trace: collect_build_prerequisites: skip cfg-negotiated dependency libbar/1.0.0 of dependent tix/1.0.0 + trace: collect_build: add tex/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency tex/1.0.0 of dependent tix/1.0.0 + trace: postponed_configurations::add: create {tix | tex->{tix/2,1}} + trace: collect_build_prerequisites: postpone tix/1.0.0 + trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1,1}}! + trace: collect_build_postponed (2): begin {tix | tex->{tix/2,1}} + %.* + trace: collect_build_postponed (2): cfg-negotiate begin {tix | tex->{tix/2,1}} + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin tex/1.0.0 + %.* + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: add {tex 1,1: libbar} to {tix | libbar->{tix/1,1}}! + trace: collect_build_prerequisites: cfg-postponing dependent tex/1.0.0 involves negotiated configurations and results in {tex tix | libbar->{tex/1,1 tix/1,1}}!, throwing retry_configuration + trace: collect_build_postponed (0): cfg-negotiation of {tix | libbar->{tix/1,1}} failed due to dependent tex, adding shadow dependent and re-negotiating + trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} + %.* + trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1,1}} + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbar/1.0.0 + trace: collect_build_prerequisites: end libbar/1.0.0 + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tix/1.0.0 + trace: collect_build_prerequisites: resume tix/1.0.0 %.* trace: collect_build: add tex/1.0.0 trace: collect_build_prerequisites: cfg-postpone dependency tex/1.0.0 of dependent tix/1.0.0 - trace: postponed_configurations::add: create {tix | tex->{tix/2}} + trace: postponed_configurations::add: create {tix | tex->{tix/2,1}} trace: collect_build_prerequisites: postpone tix/1.0.0 - trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1}} - trace: collect_build_postponed (2): begin + trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1,1}}! + trace: collect_build_postponed (2): begin {tix | tex->{tix/2,1}} %.* - trace: collect_build_postponed (2): cfg-negotiate begin {tix | tex->{tix/2}} + trace: collect_build_postponed (2): cfg-negotiate begin {tix | tex->{tix/2,1}} trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies trace: collect_build_prerequisites: begin tex/1.0.0 %.* - trace: collect_build_prerequisites: cannot cfg-postpone dependency libbar/1.0.0 of dependent tex/1.0.0 (collected prematurely), checking for configuration cycle - trace: collect_build_prerequisites: negotiated: {tix | libbar->{tix/1}} - trace: collect_build_prerequisites: being negotiated: {tix | tex->{tix/2}} - trace: postponed_configurations::add: add {tex | libbar->{tex/1}} to {tix | libbar->{tix/1}} - trace: collect_build_prerequisites: verifying {tex tix | libbar->{tex/1 tix/1}} - error: package tix/1.0.0 negotiates configuration of libbar/1.0.0 before its (potentially indirect) dependency tex/1.0.0 negotiates configuration of libbar/1.0.0 - info: consider reordering dependencies of tix/1.0.0 - info: while satisfying tex/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: add {tex 1,1: libbar} to {tix | libbar->{tix/1,1}}! + trace: collect_build_prerequisites: dependent tex/1.0.0 is a shadow dependent for {tex tix | libbar->{tex/1,1 tix/1,1}}! + trace: collect_build_prerequisites: configuration for cfg-postponed dependencies of dependent tex/1.0.0 is negotiated + trace: collect_build_prerequisites: dependency libbar/1.0.0 of dependent tex/1.0.0 is already (being) recursively collected, skipping + %.* + trace: collect_build: add libfoo/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: create {tex | libfoo->{tex/2,1}} + trace: collect_build_prerequisites: postpone tex/1.0.0 + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (2): select cfg-negotiated dependency alternative for dependent tix/1.0.0 + trace: collect_build_prerequisites: resume tix/1.0.0 + trace: collect_build_prerequisites: end tix/1.0.0 + trace: collect_build_postponed (2): cfg-negotiate end {tix | tex->{tix/2,1}}! + trace: collect_build_postponed (3): begin {tex | libfoo->{tex/2,1}} + %.* + trace: collect_build_postponed (3): cfg-negotiate begin {tex | libfoo->{tex/2,1}} + trace: collect_build_postponed (3): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libfoo/1.0.0 + trace: collect_build_prerequisites: end libfoo/1.0.0 + trace: collect_build_postponed (3): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (3): select cfg-negotiated dependency alternative for dependent tex/1.0.0 + trace: collect_build_prerequisites: resume tex/1.0.0 + trace: collect_build_prerequisites: end tex/1.0.0 + trace: collect_build_postponed (3): cfg-negotiate end {tex | libfoo->{tex/2,1}}! + trace: collect_build_postponed (3): end {tex | libfoo->{tex/2,1}} + 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 + + $pkg_status -r >>EOO; + !tix configured 1.0.0 + libbar configured 1.0.0 + tex configured 1.0.0 + libbar configured 1.0.0 + libfoo configured 1.0.0 + EOO + + $pkg_drop tix } - # @@ This test fails complaining about cycle introduced with tix/1.0.0. - # However 1.0.0 as an intermediate version for tix and the final - # version is 0.1.0 (as constrained by tux). Thus, the failure is - # premature. - # - #\ : args-tex-tix-tux : + : Here tux requires tix/0.1.0 which has no dependencies. + : { $clone_cfg; - $* tex tix tux 2>| + $* tex tix tux 2>>~%EOE%; + %.* + trace: pkg_build: refine package collection/plan execution from scratch + %.* + trace: collect_build: add tex/1.0.0 + trace: collect_build: add tix/1.0.0 + trace: collect_build: add tux/1.0.0 + trace: collect_build_prerequisites: begin tex/1.0.0 + %.* + trace: collect_build: add libbar/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: create {tex | libbar->{tex/1,1}} + trace: collect_build_prerequisites: postpone tex/1.0.0 + trace: collect_build_prerequisites: begin tix/1.0.0 + %.* + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tix/1.0.0 + trace: postponed_configurations::add: add {tix 1,1: libbar} to {tex | libbar->{tex/1,1}} + trace: collect_build_prerequisites: postpone tix/1.0.0 + trace: collect_build_prerequisites: begin tux/1.0.0 + %.* + trace: collect_build: add libbox/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbox/1.0.0 of dependent tux/1.0.0 + trace: postponed_configurations::add: create {tux | libbox->{tux/1,1}} + trace: collect_build_prerequisites: postpone tux/1.0.0 + trace: collect_build_postponed (0): begin + trace: collect_build_postponed (1): begin {tex tix | libbar->{tex/1,1 tix/1,1}} + %.* + trace: collect_build_postponed (1): cfg-negotiate begin {tex tix | libbar->{tex/1,1 tix/1,1}} + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbar/1.0.0 + trace: collect_build_prerequisites: end libbar/1.0.0 + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tex/1.0.0 + trace: collect_build_prerequisites: resume tex/1.0.0 + %.* + trace: collect_build: add libfoo/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: create {tex | libfoo->{tex/2,1}} + trace: collect_build_prerequisites: postpone tex/1.0.0 + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tix/1.0.0 + trace: collect_build_prerequisites: resume tix/1.0.0 + %.* + trace: collect_build_prerequisites: cannot cfg-postpone dependency tex/1.0.0 of dependent tix/1.0.0 (collected prematurely), throwing postpone_dependency + trace: pkg_build: collection failed due to prematurely collected dependency (tex), retry from scratch + %.* + trace: pkg_build: refine package collection/plan execution from scratch + %.* + trace: collect_build: add tex/1.0.0 + trace: collect_build: add tix/1.0.0 + trace: collect_build: add tux/1.0.0 + trace: pkg_build: dep-postpone user-specified tex + trace: collect_build_prerequisites: begin tix/1.0.0 + %.* + trace: collect_build: add libbar/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tix/1.0.0 + trace: postponed_configurations::add: create {tix | libbar->{tix/1,1}} + trace: collect_build_prerequisites: postpone tix/1.0.0 + trace: collect_build_prerequisites: begin tux/1.0.0 + %.* + trace: collect_build: add libbox/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbox/1.0.0 of dependent tux/1.0.0 + trace: postponed_configurations::add: create {tux | libbox->{tux/1,1}} + trace: collect_build_prerequisites: postpone tux/1.0.0 + trace: collect_build_postponed (0): begin + trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} + %.* + trace: collect_build_postponed (1): cfg-negotiate begin {tix | libbar->{tix/1,1}} + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbar/1.0.0 + trace: collect_build_prerequisites: end libbar/1.0.0 + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tix/1.0.0 + trace: collect_build_prerequisites: resume tix/1.0.0 + %.* + trace: collect_build_prerequisites: cfg-postpone dependency tex/1.0.0 of dependent tix/1.0.0 + trace: postponed_configurations::add: create {tix | tex->{tix/2,1}} + trace: collect_build_prerequisites: postpone tix/1.0.0 + trace: collect_build_postponed (1): cfg-negotiate end {tix | libbar->{tix/1,1}}! + trace: collect_build_postponed (2): begin {tux | libbox->{tux/1,1}} + %.* + trace: collect_build_postponed (2): cfg-negotiate begin {tux | libbox->{tux/1,1}} + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbox/1.0.0 + trace: collect_build_prerequisites: end libbox/1.0.0 + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (2): select cfg-negotiated dependency alternative for dependent tux/1.0.0 + trace: collect_build_prerequisites: resume tux/1.0.0 + %.* + trace: collect_build: pick tix/0.1.0 over tix/1.0.0 + trace: collect_build: tix/1.0.0 package version needs to be replaced with tix/0.1.0 + trace: pkg_build: collection failed due to package version replacement, retry from scratch + %.* + trace: pkg_build: refine package collection/plan execution from scratch + %.* + trace: collect_build: add tex/1.0.0 + trace: collect_build: apply version replacement for tix/1.0.0 + trace: collect_build: replacement: tix/0.1.0 + trace: collect_build: add tix/0.1.0 + trace: collect_build: add tux/1.0.0 + trace: pkg_build: dep-postpone user-specified tex + trace: collect_build_prerequisites: begin tix/0.1.0 + trace: collect_build_prerequisites: end tix/0.1.0 + trace: collect_build_prerequisites: begin tux/1.0.0 + %.* + trace: collect_build: add libbox/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbox/1.0.0 of dependent tux/1.0.0 + trace: postponed_configurations::add: create {tux | libbox->{tux/1,1}} + trace: collect_build_prerequisites: postpone tux/1.0.0 + trace: collect_build_postponed (0): begin + trace: collect_build_postponed (1): begin {tux | libbox->{tux/1,1}} + %.* + trace: collect_build_postponed (1): cfg-negotiate begin {tux | libbox->{tux/1,1}} + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbox/1.0.0 + trace: collect_build_prerequisites: end libbox/1.0.0 + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tux/1.0.0 + trace: collect_build_prerequisites: resume tux/1.0.0 + %.* + trace: collect_build_prerequisites: no cfg-clause for dependency tix/0.1.0 of dependent tux/1.0.0 + trace: collect_build_prerequisites: end tux/1.0.0 + trace: collect_build_postponed (1): cfg-negotiate end {tux | libbox->{tux/1,1}}! + trace: collect_build_postponed (1): erase bogus postponement tex + trace: collect_build_postponed (1): bogus postponements erased, throwing + trace: pkg_build: collection failed due to bogus dependency collection postponement cancellation, retry from scratch + %.* + trace: pkg_build: refine package collection/plan execution from scratch + %.* + trace: collect_build: add tex/1.0.0 + trace: collect_build: apply version replacement for tix/1.0.0 + trace: collect_build: replacement: tix/0.1.0 + trace: collect_build: add tix/0.1.0 + trace: collect_build: add tux/1.0.0 + trace: collect_build_prerequisites: begin tex/1.0.0 + %.* + trace: collect_build: add libbar/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbar/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: create {tex | libbar->{tex/1,1}} + trace: collect_build_prerequisites: postpone tex/1.0.0 + trace: collect_build_prerequisites: begin tix/0.1.0 + trace: collect_build_prerequisites: end tix/0.1.0 + trace: collect_build_prerequisites: begin tux/1.0.0 + %.* + trace: collect_build: add libbox/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libbox/1.0.0 of dependent tux/1.0.0 + trace: postponed_configurations::add: create {tux | libbox->{tux/1,1}} + trace: collect_build_prerequisites: postpone tux/1.0.0 + trace: collect_build_postponed (0): begin + trace: collect_build_postponed (1): begin {tex | libbar->{tex/1,1}} + %.* + trace: collect_build_postponed (1): cfg-negotiate begin {tex | libbar->{tex/1,1}} + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbar/1.0.0 + trace: collect_build_prerequisites: end libbar/1.0.0 + trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tex/1.0.0 + trace: collect_build_prerequisites: resume tex/1.0.0 + %.* + trace: collect_build: add libfoo/1.0.0 + trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of dependent tex/1.0.0 + trace: postponed_configurations::add: create {tex | libfoo->{tex/2,1}} + trace: collect_build_prerequisites: postpone tex/1.0.0 + trace: collect_build_postponed (1): cfg-negotiate end {tex | libbar->{tex/1,1}}! + trace: collect_build_postponed (2): begin {tux | libbox->{tux/1,1}} + %.* + trace: collect_build_postponed (2): cfg-negotiate begin {tux | libbox->{tux/1,1}} + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libbox/1.0.0 + trace: collect_build_prerequisites: end libbox/1.0.0 + trace: collect_build_postponed (2): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (2): select cfg-negotiated dependency alternative for dependent tux/1.0.0 + trace: collect_build_prerequisites: resume tux/1.0.0 + %.* + trace: collect_build_prerequisites: no cfg-clause for dependency tix/0.1.0 of dependent tux/1.0.0 + trace: collect_build_prerequisites: end tux/1.0.0 + trace: collect_build_postponed (2): cfg-negotiate end {tux | libbox->{tux/1,1}}! + trace: collect_build_postponed (3): begin {tex | libfoo->{tex/2,1}} + %.* + trace: collect_build_postponed (3): cfg-negotiate begin {tex | libfoo->{tex/2,1}} + trace: collect_build_postponed (3): recursively collect cfg-negotiated dependencies + trace: collect_build_prerequisites: begin libfoo/1.0.0 + trace: collect_build_prerequisites: end libfoo/1.0.0 + trace: collect_build_postponed (3): recursively collect cfg-negotiated dependents + trace: collect_build_postponed (3): select cfg-negotiated dependency alternative for dependent tex/1.0.0 + trace: collect_build_prerequisites: resume tex/1.0.0 + trace: collect_build_prerequisites: end tex/1.0.0 + trace: collect_build_postponed (3): cfg-negotiate end {tex | libfoo->{tex/2,1}}! + trace: collect_build_postponed (3): end {tex | libfoo->{tex/2,1}} + trace: collect_build_postponed (2): end {tux | libbox->{tux/1,1}} + trace: collect_build_postponed (1): end {tex | libbar->{tex/1,1}} + trace: collect_build_postponed (0): end + trace: execute_plan: simulate: yes + %.* + EOE + + $pkg_status -r >>EOO; + !tex configured 1.0.0 + libbar configured 1.0.0 + libfoo configured 1.0.0 + !tix configured 0.1.0 available 1.0.0 + !tux configured 1.0.0 + libbox configured 1.0.0 + !tix configured 0.1.0 available 1.0.0 + EOO + + $pkg_drop tex tix tux } - #\ : args-tex-tiz : @@ -7514,7 +7790,6 @@ test.options += --no-progress : existing : - if false { +$clone_cfg @@ -7548,7 +7823,9 @@ test.options += --no-progress trace: collect_build_postponed (1): begin {tix | libbar->{tix/1,1}} %.* trace: collect_build_postponed (1): re-evaluate existing dependents for {tix | libbar->{tix/1,1}} + %.* trace: collect_build: add tex/1.0.0 + %.* trace: postponed_configurations::add: add {tex^ 1,1: libbar} to {tix | libbar->{tix/1,1}} trace: collect_build_postponed (1): cfg-negotiate begin {tex^ tix | libbar->{tex/1,1 tix/1,1}} trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies @@ -7556,7 +7833,6 @@ test.options += --no-progress trace: collect_build_prerequisites: end libbar/1.0.0 trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tex/1.0.0 - %.* trace: collect_build_prerequisites: resume tex/1.0.0 %.* trace: collect_build: add libfoo/1.0.0 @@ -7651,7 +7927,8 @@ test.options += --no-progress trace: collect_build_prerequisites: end libfoo/1.0.0 trace: collect_build_postponed (3): recursively collect cfg-negotiated dependents trace: collect_build_postponed (3): select cfg-negotiated dependency alternative for dependent tex/1.0.0 - trace: collect_build_prerequisites: skip configured tex/1.0.0 + trace: collect_build_prerequisites: resume tex/1.0.0 + trace: collect_build_prerequisites: end tex/1.0.0 trace: collect_build_postponed (3): cfg-negotiate end {tex | libfoo->{tex/2,1}}! trace: collect_build_postponed (3): end {tex | libfoo->{tex/2,1}} trace: collect_build_postponed (2): end {tix | tex->{tix/2,1}} @@ -7661,47 +7938,26 @@ test.options += --no-progress %.* EOE - # @@ This looks wrong since configured tix hasn't been negotiating - # configuration for tex. Seems that 'skip being built existing - # dependent tix of dependency tex' was a wrong decision. We - # probably need to only skip if there is not just a build in - # the map but it is also recursively collectible (being - # upgraded, etc). + $pkg_status -r >>EOO; + !tex configured 1.0.0 + libbar configured 1.0.0 + libfoo configured 1.0.0 + !tix configured 1.0.0 + libbar configured 1.0.0 + !tex configured 1.0.0 + libbar configured 1.0.0 + libfoo configured 1.0.0 + EOO + + # Note that tex/0.1.0 doesn't depend on libbar. # + # In particular, make sure tix is re-evaluated in the strict mode + # up to the tex dependency. + # + #\ $* tix tex/0.1.0 2>>~%EOE%; - %.* - trace: pkg_build: refine package collection/plan execution from scratch - %.* - trace: collect_build: add tix/1.0.0 - trace: collect_build: add tex/0.1.0 - trace: collect_build_prerequisites: skip configured tix/1.0.0 - %.* - trace: collect_build_prerequisites: skip being built existing dependent tix of dependency tex - trace: collect_build_prerequisites: begin tex/0.1.0 - %.* - trace: collect_build: add libfoo/1.0.0 - trace: collect_build_prerequisites: cfg-postpone dependency libfoo/1.0.0 of dependent tex/0.1.0 - trace: postponed_configurations::add: create {tex | libfoo->{tex/1,1}} - trace: collect_build_prerequisites: postpone tex/0.1.0 - trace: collect_build_postponed (0): begin - trace: collect_build_postponed (1): begin {tex | libfoo->{tex/1,1}} - %.* - trace: collect_build_postponed (1): skip being built existing dependent tex of dependency libfoo - trace: collect_build_postponed (1): cfg-negotiate begin {tex | libfoo->{tex/1,1}} - trace: collect_build_postponed (1): recursively collect cfg-negotiated dependencies - trace: collect_build_prerequisites: begin libfoo/1.0.0 - trace: collect_build_prerequisites: end libfoo/1.0.0 - trace: collect_build_postponed (1): recursively collect cfg-negotiated dependents - trace: collect_build_postponed (1): select cfg-negotiated dependency alternative for dependent tex/0.1.0 - trace: collect_build_prerequisites: resume tex/0.1.0 - trace: collect_build_prerequisites: end tex/0.1.0 - trace: collect_build_postponed (1): cfg-negotiate end {tex | libfoo->{tex/1,1}}! - trace: collect_build_postponed (1): end {tex | libfoo->{tex/1,1}} - trace: collect_build_postponed (0): end - %.* - trace: execute_plan: simulate: yes - %.* EOE + #\ # @@ Should we also test the following commands instead of the # previous? |