From a548f9c8c9f68ff19c7d18d3159b5f025b5ae4eb Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 3 Jul 2024 17:55:36 +0300 Subject: Ignore dependent-imposed dependency constraints not satisfied with user-specified constraints and add them to unsatisfied dependents list --- bpkg/pkg-build-collect.cxx | 225 +++++++++++++++++++++++++++++++++----------- bpkg/pkg-build-collect.hxx | 33 ++++--- tests/pkg-build.testscript | 101 +++++++++++++++----- tests/pkg-system.testscript | 6 +- 4 files changed, 266 insertions(+), 99 deletions(-) diff --git a/bpkg/pkg-build-collect.cxx b/bpkg/pkg-build-collect.cxx index d71bb3b..5485672 100644 --- a/bpkg/pkg-build-collect.cxx +++ b/bpkg/pkg-build-collect.cxx @@ -554,6 +554,31 @@ namespace bpkg dpt, {ignored_constraint (dep, c, move (ucs), move (dc))}}); } + void unsatisfied_dependents:: + add (unsatisfied_dependent&& udep) + { + if (unsatisfied_dependent* ud = find_dependent (udep.dependent)) + { + vector& ics (ud->ignored_constraints); + + for (ignored_constraint& ic: udep.ignored_constraints) + { + const package_key& dep (ic.dependency); + + // Skip the dependency if it is already in the list. + // + if (find_if (ics.begin (), ics.end (), + [dep] (const auto& v) {return v.dependency == dep;}) == + ics.end ()) + { + ics.push_back (move (ic)); + } + } + } + else + push_back (move (udep)); + } + unsatisfied_dependent* unsatisfied_dependents:: find_dependent (const package_key& dk) { @@ -712,7 +737,7 @@ namespace bpkg else // 'unable to satisfy constraints' failure. { diag_record dr (fail); - dr << "unable to satisfy constraints on package " << n; + dr << "unable to satisfy constraints on package " << n << p->db; for (const unsatisfied_constraint& uc: ucs) { @@ -730,8 +755,9 @@ namespace bpkg for (const unsatisfied_constraint& uc: ucs) { - dr << info << "available " - << package_string (n, uc.available_version, uc.available_system); + if (uc.available_version) + dr << info << "available " + << package_string (n, *uc.available_version, uc.available_system); } for (const package_key& d: reverse_iterate (ic.dependency_chain)) @@ -743,7 +769,8 @@ namespace bpkg } dr << info << "explicitly specify " << n << " version to " - << "manually satisfy both constraints" << endf; + << "manually satisfy " << (ucs.size () == 2 ? "both" : "all") + << " constraints" << endf; } } @@ -2452,11 +2479,16 @@ namespace bpkg // latter is a subset of former. If it is not a subset, then bail out // indicating that the alternative dependencies cannot be resolved // (builds is nullopt), unless ignore_unsatisfactory_dep_spec argument - // is true. In the latter case continue precollecting as if no - // constraint is specified on the command line for this dependency. That - // will likely result in the unsatisfied dependent problem, which will - // be either resolved or end up with the failure (see - // unsatisfied_dependents for details). + // is true. In the latter case continue precollecting, ignoring the + // unsatisfied dependency constraint imposed by the dependent and + // returning such constraints in the + // precollect_result::unsatisfied_dependent member. If this alternative + // is get selected, then this unsatisfied dependent/constraints are + // recorded (see unsatisfied_dependents for details). Save both the + // original dependency constraint imposed by the dependent + // (dependency_constraint) and the effective dependency constraint (the + // same as dependency_constraint or the command line constraint, if + // overwritten). // // Note that rather than considering an alternative as unsatisfactory // (returning no pre-builds) the function can fail in some cases @@ -2468,8 +2500,10 @@ namespace bpkg // struct prebuild { - bpkg::dependency dependency; + package_name dependency; reference_wrapper db; + optional dependency_constraint; + optional effective_constraint; shared_ptr selected; shared_ptr available; lazy_shared_ptr repository_fragment; @@ -2491,6 +2525,12 @@ namespace bpkg // optional builds; + // If present, contains ignored dependency constraints imposed by this + // dependent, which are not satisfied by the user-specified + // constraints. May only be present if the builds member is present. + // + optional unsatisfied_dependent; + // If true is passed as the check_constraints argument to precollect() // and some dependency of the alternative cannot be resolved because // there is no version available which can satisfy all the being built @@ -2514,13 +2554,17 @@ namespace bpkg // Create precollect result containing dependency builds. // - precollect_result (prebuilds&& bs, bool r) - : builds (move (bs)), reused (r) {} + precollect_result (prebuilds&& bs, + bool r, + optional&& ud) + : builds (move (bs)), + unsatisfied_dependent (move (ud)), + reused (r) {} // Create precollect result containing unsatisfactory dependency // builds. // - precollect_result (bool r, prebuilds&& bs) + precollect_result (prebuilds&& bs, bool r) : unsatisfactory (move (bs)), reused (r) {} // Create precollect result without builds (some dependency can't be @@ -2534,6 +2578,7 @@ namespace bpkg &pkg, &nm, &pdb, + &pk, ud, &fdb, rpt_prereq_flags, @@ -2553,6 +2598,7 @@ namespace bpkg { prebuilds r; bool reused (true); + optional udep; const lazy_shared_ptr& af ( pkg.repository_fragment); @@ -2610,7 +2656,7 @@ namespace bpkg // Points to the desired dependency version constraint, if // specified, and is NULL otherwise. Can be used as boolean flag. // - const version_constraint* dep_constr (nullptr); + const build_package::constraint_type* dep_constr (nullptr); database* ddb (fdb (pdb, dn, buildtime)); @@ -2644,6 +2690,13 @@ namespace bpkg // assert (!pre_reeval || dr == nullptr); + // If we are in the 'ignore unsatisfactory dependency spec' + // mode, then just continue as if there is no dependency + // constraint imposed by the dependent, precollecting the + // dependency with the constraint imposed by the command + // line. Also stash the ignored dependency constraint to + // return it later, together with the precollected builds. + // if (!ignore_unsatisfactory_dep_spec) { if (dr != nullptr) @@ -2676,10 +2729,52 @@ namespace bpkg return precollect_result (false /* postpone */); } + else + { + dep_constr = &c; + system = bp.system; + + l5 ([&]{trace << "postpone failure for constraint (" << dp + << ") of dependent " << pk << " unsatisfied " + << "with user-specified constraint (" << dn + << ' ' << c.value << ')';}); + + if (!udep) + udep = unsatisfied_dependent {pk, {}}; + + using constraint_type = build_package::constraint_type; + + vector ucs { + unsatisfied_constraint { + constraint_type (*dp.constraint, + pdb, + nm, + pkg.available_version (), + false /* existing_dependent */), + nullopt /* available_version */, + false /* available_system */}, + unsatisfied_constraint { + c, + nullopt /* available_version */, + false /* available_system */} + }; + + vector dc; + dc.reserve (dep_chain.size ()); + + for (const build_package& p: dep_chain) + dc.emplace_back (p.db, p.name ()); + + udep->ignored_constraints.emplace_back ( + package_key (bp.db, dn), + *dp.constraint, + move (ucs), + move (dc)); + } } else { - dep_constr = &c.value; + dep_constr = &c; system = bp.system; } } @@ -2687,7 +2782,7 @@ namespace bpkg const dependency& d (!dep_constr ? dp - : dependency {dn, *dep_constr}); + : dependency {dn, dep_constr->value}); // First see if this package is already selected. If we already // have it in the configuration and it satisfies our dependency @@ -3199,7 +3294,7 @@ namespace bpkg << pkg.available_name_version_db () << " due to dependency " << dp << " and user-specified constraint " - << *dep_constr;}); + << dep_constr->value;}); postponed_repo->insert (&pkg); } @@ -3234,11 +3329,15 @@ namespace bpkg // constraint. // if (d.constraint && - (!dep_constr || !wildcard (*dep_constr))) + (!dep_constr || !wildcard (dep_constr->value))) dr << ' ' << *d.constraint; - dr << ") of package " << nm << pdb << - info << "available " << dn << " versions:"; + dr << ')'; + + if (!dep_constr) + dr << " of package " << nm << pdb; + + dr << info << "available " << dn << " versions:"; for (const shared_ptr& ap: aps) dr << ' ' << ap->version; @@ -3332,8 +3431,23 @@ namespace bpkg if (!ru) reused = false; - r.push_back (prebuild {d, + using constraint_type = build_package::constraint_type; + + optional dc ( + dp.constraint + ? constraint_type (*dp.constraint, + pdb, + nm, + pkg.available_version (), + false /* existing_dependent */) + : optional ()); + + optional ec (dep_constr ? *dep_constr : dc); + + r.push_back (prebuild {d.name, *ddb, + move (dc), + move (ec), move (dsp), move (dap), move (rp.second), @@ -3366,11 +3480,9 @@ namespace bpkg // assert (dap != nullptr); - const dependency& d (b.dependency); - - auto i (map_.find (b.db, d.name)); + auto i (map_.find (b.db, b.dependency)); - if (i != map_.end () && d.constraint) + if (i != map_.end () && b.effective_constraint) { const build_package& bp (i->second.package); @@ -3386,11 +3498,7 @@ namespace bpkg { using constraint_type = build_package::constraint_type; - constraint_type c1 (*d.constraint, - pdb, - nm, - pkg.available_version (), - false /* existing_dependent */); + const constraint_type& c1 (*b.effective_constraint); if (!satisfies (v2, c1.value)) { @@ -3406,7 +3514,7 @@ namespace bpkg if (dr != nullptr) { - const package_name& n (d.name); + const package_name& n (b.dependency); // " info: ..." string indent (" "); @@ -3440,7 +3548,7 @@ namespace bpkg << "constraints"; } - return precollect_result (reused, move (r)); + return precollect_result (move (r), reused); } } } @@ -3450,7 +3558,7 @@ namespace bpkg } } - return precollect_result (move (r), reused); + return precollect_result (move (r), reused, move (udep)); }; // Try to collect the previously collected pre-builds. @@ -3460,8 +3568,6 @@ namespace bpkg // auto collect = [&options, &pkg, - &pdb, - &nm, &pk, &fdb, &rpt_depts, @@ -3489,6 +3595,7 @@ namespace bpkg (const dependency_alternative& da, size_t dai, prebuilds&& bs, + optional&& udep, const package_prerequisites* prereqs, bool check_constraints, bool ignore_unsatisfactory_dep_spec) @@ -3517,6 +3624,9 @@ namespace bpkg postponed_deps.erase (d); })); + if (udep) + unsatisfied_depts.add (move (*udep)); + package_version_key pvk (pk.db, pk.name, pkg.available_version ()); for (prebuild& b: bs) @@ -3548,22 +3658,17 @@ namespace bpkg true, // Required by dependents. 0}; // State flags. - const optional& constraint ( - b.dependency.constraint); - - // Add our constraint, if we have one. + // Add all our constraints for completeness, if we have any. // - // Note that we always add the constraint implied by the - // dependent. The user-implied constraint, if present, will be - // added when merging from the pre-entered entry. So we will have - // both constraints for completeness. - // - if (constraint) - bpk.constraints.emplace_back (*constraint, - pdb, - nm, - pkg.available_version (), - false /* existing_dependent */); + if (b.effective_constraint) + { + bpk.constraints.push_back (*b.effective_constraint); + + if (b.dependency_constraint && + b.dependency_constraint->dependent != + b.effective_constraint->dependent) + bpk.constraints.push_back (*b.dependency_constraint); + } // Now collect this prerequisite. If it was actually collected // (i.e., it wasn't already there) and we are forcing a downgrade @@ -3627,7 +3732,9 @@ namespace bpkg const version& av (p.available_version ()); bool u (av > prq.selected->version); - bool c (prq.dependency.constraint); + + const optional& c ( + prq.dependency_constraint); diag_record dr; @@ -3635,7 +3742,11 @@ namespace bpkg w ? dr << warn : dr << info) << "package " << dep.name () << dep.db - << " dependency on " << (c ? "(" : "") << prq.dependency + << " dependency on " << (c ? "(" : "") + << dependency (prq.dependency, + c + ? c->value + : optional ()) << (c ? ")" : "") << " is forcing " << (u ? "up" : "down") << "grade of " << *prq.selected << prq.db << " to "; @@ -4624,7 +4735,7 @@ namespace bpkg find_if (pbs.begin (), pbs.end (), [&orig_dep] (const prebuild& pb) { - return pb.dependency.name == orig_dep->name && + return pb.dependency == orig_dep->name && pb.db == orig_dep->db; }) != pbs.end ()); @@ -4650,7 +4761,7 @@ namespace bpkg for (prebuild& pb: pbs) r.reevaluation_dependencies.emplace_back ( - pb.db, move (pb.dependency.name)); + pb.db, move (pb.dependency)); } // Save the variable prefixes for the selected alternative @@ -4948,6 +5059,7 @@ namespace bpkg else if (!collect (da, dai, move (*pcr.builds), + move (pcr.unsatisfied_dependent), prereqs, check_constraints, ignore_unsatisfactory_dep_spec)) @@ -5036,6 +5148,7 @@ namespace bpkg else if (!collect (da, dai, move (*pcr.builds), + move (pcr.unsatisfied_dependent), prereqs, check_constraints, ignore_unsatisfactory_dep_spec)) @@ -5182,7 +5295,7 @@ namespace bpkg for (const prebuild& b: *r.builds) { if (!b.reused) - dr << ' ' << b.dependency.name; + dr << ' ' << b.dependency; } } } @@ -5211,7 +5324,7 @@ namespace bpkg dr << info << "unsatisfactory alternative:"; for (const prebuild& b: *r.unsatisfactory) - dr << ' ' << b.dependency.name; + dr << ' ' << b.dependency; // Print the reason. // diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx index 493e0f1..ad2b89e 100644 --- a/bpkg/pkg-build-collect.hxx +++ b/bpkg/pkg-build-collect.hxx @@ -764,21 +764,22 @@ namespace bpkg cancel_bogus (tracer&, bool scratch); }; - - // Dependents with their unsatisfactory dependencies and the respective - // ignored constraints. + // Dependents with their ignored dependency constraints and, optionally, + // with the respective unsatisfactory dependency versions. // // Note that during the collecting of all the explicitly specified packages // and their dependencies for the build, we may discover that a being // up/downgraded dependency doesn't satisfy all the being reconfigured, - // up/downgraded, or newly built dependents. Rather than fail immediately in - // such a case, we postpone the failure, add the unsatisfied dependents and - // their respective constraints to the unsatisfied dependents list, and - // continue the collection/ordering in the hope that these problems will be - // resolved naturally as a result of the requested recollection from scratch - // or execution plan refinement (dependents will also be up/downgraded or - // dropped, dependencies will be up/downgraded to a different versions, - // etc). + // up/downgraded, or newly built dependents. We may also discover that a + // user-specified dependency constraint does not satisfy constraints imposed + // by some dependent packages on this dependency. Rather than fail + // immediately in such cases, we postpone the failure, add the unsatisfied + // dependents and their respective constraints to the unsatisfied dependents + // list, and continue the collection/ordering in the hope that these + // problems will be resolved naturally as a result of the requested + // recollection from scratch or execution plan refinement (dependents will + // also be up/downgraded or dropped, dependencies will be up/downgraded to a + // different versions, etc). // // Also note that after collecting/ordering of all the explicitly specified // packages and their dependencies for the build we also collect/order their @@ -838,10 +839,11 @@ namespace bpkg // build_package::constraint_type constraint; - // Available package version which satisfies the above constraint. + // Optional available package version which satisfies the above + // constraint. // - version available_version; - bool available_system; + optional available_version; + bool available_system; }; struct ignored_constraint @@ -886,6 +888,9 @@ namespace bpkg vector&& ucs = {}, vector&& dc = {}); + void + add (unsatisfied_dependent&&); + // Try to find the dependent entry and return NULL if not found. // unsatisfied_dependent* diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 9326541..faa4934 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -1306,7 +1306,7 @@ test.arguments += --sys-no-query $* libbaz ?libfoo/1.0.0 2>>EOE != 0 error: unable to satisfy constraints on package libfoo - info: libbaz/1.1.0 depends on (libfoo == 1.0.0) + info: command line depends on (libfoo == 1.0.0) info: libbar/1.1.0 depends on (libfoo == 1.1.0) info: available libfoo/1.0.0 info: available libfoo/1.1.0 @@ -1326,7 +1326,7 @@ test.arguments += --sys-no-query $cfg_link -d cfg cfg2; $rep_add -d cfg2 $rep/t4c && $rep_fetch -d cfg2; $* libbaz ?libbar +{ --config-id 1 } libfoo/1.0.0 +{ --config-id 1 } 2>>~%EOE% != 0 - error: unable to satisfy constraints on package libfoo + %error: unable to satisfy constraints on package libfoo \[cfg2.\]% info: command line depends on (libfoo == 1.0.0) % info: libbar/1.1.0 \[cfg2.\] depends on \(libfoo == 1.1.0\)% info: available libfoo/1.0.0 @@ -1390,8 +1390,13 @@ test.arguments += --sys-no-query # (libbaz) repositories. # $* libbar ?libfoo/1.0.0 libbaz 2>>EOE != 0 - error: package libfoo doesn't satisfy its dependents - info: libfoo/1.0.0 doesn't satisfy libbar/1.1.0 + error: unable to satisfy constraints on package libfoo + info: command line depends on (libfoo == 1.0.0) + info: libbar/1.1.0 depends on (libfoo == 1.1.0) + info: available libfoo/1.0.0 + info: available libfoo/1.1.0 + info: while satisfying libbar/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints EOE } } @@ -2951,17 +2956,17 @@ test.arguments += --sys-no-query info: consider specifying sys:libhello/* EOE - $* "sys:libhello/2.0@$rep/t0a" --trust-yes 2>>~%EOE% != 0; - %.+ - %error: package sys:libhello/2\.0 is not found in .+t0a% - EOE - $* libfoo '?sys:libhello/0.1' 2>>EOE != 0; error: unable to satisfy constraints on package libhello - info: libfoo depends on (libhello >= 1.0) + info: libfoo/1.1.0 depends on (libhello >= 1.0) info: command line depends on (libhello == 0.1) - info: specify libhello version to satisfy libfoo constraint - info: while satisfying libfoo/1.1.0 + info: while satisfying libfoo/1.1.0 + info: explicitly specify libhello version to manually satisfy both constraints + EOE + + $* "sys:libhello/2.0@$rep/t0a" --trust-yes 2>>~%EOE% != 0; + %.+ + %error: package sys:libhello/2\.0 is not found in .+t0a% EOE $* libfoo '?sys:libhello/*' 2>>~%EOE%; @@ -3192,8 +3197,16 @@ test.arguments += --sys-no-query # info: specify libbaz version to satisfy libbar constraint # info: while satisfying libbar/0.0.1 # + # Then, before we have started to ignore the dependent constraints which + # are not satisfied with the command line constraints and to add them to + # the unsatisfied dependents list, this command has failed as follows: + # + # error: libbaz/0.0.2 is not available from its dependents' repositories + # $* libbar/0.0.1 ?libbaz/0.0.2 2>>EOE != 0; - error: libbaz/0.0.2 is not available from its dependents' repositories + error: unable to satisfy dependency constraint (libbaz == 0.0.2) + info: available libbaz versions: 0.0.3 0.0.1 + info: while satisfying libbar/0.0.1 EOE # Note that before we have implemented the unsatisfied constraints @@ -3206,9 +3219,20 @@ test.arguments += --sys-no-query # info: specify libbaz version to satisfy libbar constraint # info: while satisfying libbar/0.0.1 # + # Then, before we have started to ignore the dependent constraints which + # are not satisfied with the command line constraints and to add them to + # the unsatisfied dependents list, this command has failed as follows: + # + # error: package libbaz doesn't satisfy its dependents + # info: libbaz/0.0.3 doesn't satisfy libbar/0.0.1 + # $* -- libbar/0.0.1 '?libbaz>=0.0.2' 2>>EOE != 0 - error: package libbaz doesn't satisfy its dependents - info: libbaz/0.0.3 doesn't satisfy libbar/0.0.1 + error: unable to satisfy constraints on package libbaz + info: libbar/0.0.1 depends on (libbaz == 0.0.1) + command line requires (libbar == 0.0.1) + info: command line depends on (libbaz >= 0.0.2) + info: while satisfying libbar/0.0.1 + info: explicitly specify libbaz version to manually satisfy both constraints EOE } @@ -3469,7 +3493,7 @@ test.arguments += --sys-no-query $rep_fetch $rep/t0a $rep/t0c; $* libbar/1.0.0 ?libfoo/0.0.1 2>>EOE != 0 - error: unable to satisfy dependency constraint (libfoo == 0.0.1) of package libbar + error: unable to satisfy dependency constraint (libfoo == 0.0.1) info: available libfoo versions: 1.0.0 info: while satisfying libbar/1.0.0 EOE @@ -4249,8 +4273,11 @@ test.arguments += --sys-no-query $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; $* ?libbaz/0.0.3 +{ --config-id 1 } 2>>~%EOE% != 0; - %error: package libbaz \[cfg2.\] doesn't satisfy its dependents% - info: libbaz/0.0.3 doesn't satisfy libbar/0.0.1 + %error: unable to satisfy constraints on package libbaz \[cfg2.\]% + info: libbar/0.0.1 depends on (libbaz == 0.0.1) + info: command line depends on (libbaz == 0.0.3) + info: while satisfying libbar/0.0.1 + info: explicitly specify libbaz version to manually satisfy both constraints EOE $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; @@ -5916,12 +5943,20 @@ test.arguments += --sys-no-query { $clone_cfg; + # Dependencies: + # + # libbaz/2.0.0: depends: libbar < 2.1.0 + # libfox/1.1.0: depends: libbar >= 1.0.0 + # + # libbar: 0.1.0, 1.2.0, 2.1.0 + # $* libbaz libfox/1.1.0 '?libbar < 3.0.0' 2>>~%EOE%; %.* trace: pkg_build: refine package collection/plan execution from scratch trace: collect_build: add libbaz/2.0.0 trace: collect_build: add libfox/1.1.0 trace: collect_build_prerequisites: begin libbaz/2.0.0 + trace: collect_build_prerequisites: postpone failure for constraint (libbar < 2.1.0) of dependent libbaz unsatisfied with user-specified constraint (libbar < 3.0.0) trace: collect_build_prerequisites: no cfg-clause for dependency libbar/0.1.0 of dependent libbaz/2.0.0 trace: collect_build_prerequisites: begin libbar/0.1.0 trace: collect_build_prerequisites: end libbar/0.1.0 @@ -33736,8 +33771,11 @@ else $rep_add $rep/t4b && $rep_fetch; $* libbar "?$src/libfoo-1.0.0.tar.gz" 2>>EOE != 0 - error: package libfoo doesn't satisfy its dependents - info: libfoo/1.0.0 doesn't satisfy libbar/1.1.0 + error: unable to satisfy constraints on package libfoo + info: libbar/1.1.0 depends on (libfoo == 1.1.0) + info: command line depends on (libfoo == 1.0.0) + info: while satisfying libbar/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints EOE } @@ -33750,8 +33788,12 @@ else $rep_add $rep/t4a && $rep_fetch; $* $src/libbar-1.1.0.tar.gz "?$src/libfoo-1.0.0.tar.gz" 2>>EOE != 0 - error: package libfoo doesn't satisfy its dependents - info: libfoo/1.0.0 doesn't satisfy libbar/1.1.0 + error: unable to satisfy constraints on package libfoo + info: libbar/1.1.0 depends on (libfoo == 1.1.0) + command line requires (libbar == 1.1.0) + info: command line depends on (libfoo == 1.0.0) + info: while satisfying libbar/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints EOE } @@ -34141,8 +34183,11 @@ else $rep_add $rep/t4b && $rep_fetch; $* libbar "?$d/libfoo-1.0.0/" 2>>EOE != 0 - error: package libfoo doesn't satisfy its dependents - info: libfoo/1.0.0 doesn't satisfy libbar/1.1.0 + error: unable to satisfy constraints on package libfoo + info: libbar/1.1.0 depends on (libfoo == 1.1.0) + info: command line depends on (libfoo == 1.0.0) + info: while satisfying libbar/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints EOE } @@ -34155,8 +34200,12 @@ else $rep_add $rep/t4a && $rep_fetch; $* $d/libbar-1.1.0/ "?$d/libfoo-1.0.0/" 2>>EOE != 0 - error: package libfoo doesn't satisfy its dependents - info: libfoo/1.0.0 doesn't satisfy libbar/1.1.0 + error: unable to satisfy constraints on package libfoo + info: libbar/1.1.0 depends on (libfoo == 1.1.0) + command line requires (libbar == 1.1.0) + info: command line depends on (libfoo == 1.0.0) + info: while satisfying libbar/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints EOE } diff --git a/tests/pkg-system.testscript b/tests/pkg-system.testscript index 11ed1cc..c2e9c12 100644 --- a/tests/pkg-system.testscript +++ b/tests/pkg-system.testscript @@ -857,10 +857,10 @@ rep_remove += -d cfg 2>! $pkg_build foo '?sys:libbar/1' 2>>EOE != 0; error: unable to satisfy constraints on package libbar - info: foo depends on (libbar >= 2) + info: foo/2 depends on (libbar >= 2) info: command line depends on (libbar == 1) - info: specify libbar version to satisfy foo constraint - info: while satisfying foo/2 + info: while satisfying foo/2 + info: explicitly specify libbar version to manually satisfy both constraints EOE $pkg_status foo >'foo available 2'; -- cgit v1.1