diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-08-26 20:53:31 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-09-25 11:35:25 +0300 |
commit | 549d8783022f31c4792fa2d2071a75910a41cc8e (patch) | |
tree | 7cf69a1099664f07f8408304fda87024b16dced1 /bpkg | |
parent | e826ff4361bced296a8d7af57228755d22a31f15 (diff) |
Disable in-place version replacement in pkg-build since sometimes it is applied erroneously
Diffstat (limited to 'bpkg')
-rw-r--r-- | bpkg/pkg-build-collect.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/bpkg/pkg-build-collect.cxx b/bpkg/pkg-build-collect.cxx index 30a9e90..2c89a1c 100644 --- a/bpkg/pkg-build-collect.cxx +++ b/bpkg/pkg-build-collect.cxx @@ -1384,9 +1384,21 @@ namespace bpkg // toolchain build-time dependencies since they should be quite // common. // + // An update: it turned out that just the absence of dependencies + // is not the only condition that causes a package to be replaced + // in place. It must also not participate in any configuration + // negotiation on the dependency side (otherwise we could have + // missed collecting its existing dependents). Also, we need to + // make sure that the package up/downgrade doesn't cause the + // selection of a different dependency alternative for any of its + // dependents (see postponed_packages for possible outcomes). This + // all sounds quite hairy at the moment, so we won't be replacing + // in place for now (which is an optimization). + // +#if 0 if (!has_dependencies (options, p2->available->dependencies)) scratch = false; - +#endif l5 ([&]{trace << p2->available_name_version_db () << " package version needs to be replaced " << (!scratch ? "in-place " : "") << "with " @@ -4456,7 +4468,7 @@ namespace bpkg } void build_packages:: - collect_drop (const pkg_build_options& options, + collect_drop (const pkg_build_options&, database& db, shared_ptr<selected_package> sp, replaced_versions& replaced_vers) @@ -4538,8 +4550,17 @@ namespace bpkg // toolchain build-time dependencies since they should be quite // common. // + // An update: it turned out that just absence of dependencies is not + // the only condition that causes a package to be dropped in place. It + // must also not participate in any configuration negotiation on the + // dependency side (otherwise it could have been added to a cluster as + // a dependency). This feels quite hairy at the moment, so we won't be + // dropping in place for now. + // +#if 0 if (!has_dependencies (options, bp.available->dependencies)) scratch = false; +#endif l5 ([&]{trace << bp.available_name_version_db () << " package version needs to be replaced " |