mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 18:32:47 +08:00
[vcpkg] Remove versions feature flag check in all places except inputs (#15676)
This commit is contained in:
parent
a184395582
commit
d9351c9c3f
@ -846,82 +846,54 @@ namespace vcpkg::Install
|
|||||||
features.erase(core_it);
|
features.erase(core_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.versions_enabled() || args.registries_enabled())
|
if (!manifest_scf.core_paragraph->overrides.empty())
|
||||||
{
|
{
|
||||||
if (!manifest_scf.core_paragraph->overrides.empty())
|
Metrics::g_metrics.lock()->track_property("manifest_overrides", "defined");
|
||||||
{
|
|
||||||
Metrics::g_metrics.lock()->track_property("manifest_overrides", "defined");
|
|
||||||
}
|
|
||||||
if (auto p_baseline = manifest_scf.core_paragraph->builtin_baseline.get())
|
|
||||||
{
|
|
||||||
Metrics::g_metrics.lock()->track_property("manifest_baseline", "defined");
|
|
||||||
if (p_baseline->size() != 40 || !std::all_of(p_baseline->begin(), p_baseline->end(), [](char ch) {
|
|
||||||
return (ch >= 'a' || ch <= 'f') || Parse::ParserBase::is_ascii_digit(ch);
|
|
||||||
}))
|
|
||||||
{
|
|
||||||
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,
|
|
||||||
paths.get_current_git_sha_message());
|
|
||||||
}
|
|
||||||
paths.get_configuration().registry_set.experimental_set_builtin_registry_baseline(*p_baseline);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (args.versions_enabled())
|
if (auto p_baseline = manifest_scf.core_paragraph->builtin_baseline.get())
|
||||||
{
|
{
|
||||||
auto verprovider = PortFileProvider::make_versioned_portfile_provider(paths);
|
Metrics::g_metrics.lock()->track_property("manifest_baseline", "defined");
|
||||||
auto baseprovider = PortFileProvider::make_baseline_provider(paths);
|
if (p_baseline->size() != 40 || !std::all_of(p_baseline->begin(), p_baseline->end(), [](char ch) {
|
||||||
auto oprovider = PortFileProvider::make_overlay_provider(paths, args.overlay_ports);
|
return (ch >= 'a' || ch <= 'f') || Parse::ParserBase::is_ascii_digit(ch);
|
||||||
|
}))
|
||||||
auto install_plan =
|
|
||||||
Dependencies::create_versioned_install_plan(*verprovider,
|
|
||||||
*baseprovider,
|
|
||||||
*oprovider,
|
|
||||||
var_provider,
|
|
||||||
manifest_scf.core_paragraph->dependencies,
|
|
||||||
manifest_scf.core_paragraph->overrides,
|
|
||||||
{manifest_scf.core_paragraph->name, default_triplet})
|
|
||||||
.value_or_exit(VCPKG_LINE_INFO);
|
|
||||||
|
|
||||||
for (InstallPlanAction& action : install_plan.install_actions)
|
|
||||||
{
|
{
|
||||||
action.build_options = install_plan_options;
|
Checks::exit_with_message(VCPKG_LINE_INFO,
|
||||||
action.build_options.use_head_version = Build::UseHeadVersion::NO;
|
"Error: the top-level builtin-baseline (%s) was not a valid commit sha: "
|
||||||
action.build_options.editable = Build::Editable::NO;
|
"expected 40 lowercase hexadecimal characters.\n%s\n",
|
||||||
|
*p_baseline,
|
||||||
|
paths.get_current_git_sha_message());
|
||||||
}
|
}
|
||||||
|
paths.get_configuration().registry_set.experimental_set_builtin_registry_baseline(*p_baseline);
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
|
||||||
Commands::SetInstalled::perform_and_exit_ex(args,
|
auto install_plan =
|
||||||
paths,
|
Dependencies::create_versioned_install_plan(*verprovider,
|
||||||
provider,
|
*baseprovider,
|
||||||
*binaryprovider,
|
*oprovider,
|
||||||
var_provider,
|
var_provider,
|
||||||
std::move(install_plan),
|
manifest_scf.core_paragraph->dependencies,
|
||||||
dry_run ? Commands::DryRun::Yes : Commands::DryRun::No,
|
manifest_scf.core_paragraph->overrides,
|
||||||
pkgsconfig);
|
{manifest_scf.core_paragraph->name, default_triplet})
|
||||||
}
|
.value_or_exit(VCPKG_LINE_INFO);
|
||||||
else
|
|
||||||
|
for (InstallPlanAction& action : install_plan.install_actions)
|
||||||
{
|
{
|
||||||
auto specs = resolve_deps_as_top_level(manifest_scf, default_triplet, features, var_provider);
|
action.build_options = install_plan_options;
|
||||||
auto install_plan = Dependencies::create_feature_install_plan(provider, var_provider, specs, {});
|
action.build_options.use_head_version = Build::UseHeadVersion::NO;
|
||||||
|
action.build_options.editable = Build::Editable::NO;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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) {
|
const std::vector<FullPackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user