[vcpkg] Remove versions feature flag check in all places except inputs (#15676)

This commit is contained in:
ras0219 2021-01-15 13:54:39 -08:00 committed by GitHub
parent a184395582
commit d9351c9c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -846,8 +846,6 @@ namespace vcpkg::Install
features.erase(core_it);
}
if (args.versions_enabled() || args.registries_enabled())
{
if (!manifest_scf.core_paragraph->overrides.empty())
{
Metrics::g_metrics.lock()->track_property("manifest_overrides", "defined");
@ -859,8 +857,7 @@ namespace vcpkg::Install
return (ch >= 'a' || ch <= 'f') || Parse::ParserBase::is_ascii_digit(ch);
}))
{
Checks::exit_with_message(
VCPKG_LINE_INFO,
Checks::exit_with_message(VCPKG_LINE_INFO,
"Error: the top-level builtin-baseline (%s) was not a valid commit sha: "
"expected 40 lowercase hexadecimal characters.\n%s\n",
*p_baseline,
@ -868,9 +865,6 @@ namespace vcpkg::Install
}
paths.get_configuration().registry_set.experimental_set_builtin_registry_baseline(*p_baseline);
}
}
if (args.versions_enabled())
{
auto verprovider = PortFileProvider::make_versioned_portfile_provider(paths);
auto baseprovider = PortFileProvider::make_baseline_provider(paths);
auto oprovider = PortFileProvider::make_overlay_provider(paths, args.overlay_ports);
@ -901,28 +895,6 @@ namespace vcpkg::Install
dry_run ? Commands::DryRun::Yes : Commands::DryRun::No,
pkgsconfig);
}
else
{
auto specs = resolve_deps_as_top_level(manifest_scf, default_triplet, features, var_provider);
auto install_plan = Dependencies::create_feature_install_plan(provider, var_provider, specs, {});
for (InstallPlanAction& action : install_plan.install_actions)
{
action.build_options = install_plan_options;
action.build_options.use_head_version = Build::UseHeadVersion::NO;
action.build_options.editable = Build::Editable::NO;
}
Commands::SetInstalled::perform_and_exit_ex(args,
paths,
provider,
*binaryprovider,
var_provider,
std::move(install_plan),
dry_run ? Commands::DryRun::Yes : Commands::DryRun::No,
pkgsconfig);
}
}
const std::vector<FullPackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
return Input::check_and_get_full_package_spec(