diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-03 16:22:32 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-04 16:44:44 -0700 |
| commit | 39d6688e028d9831ac7c8c914c80d150b2e10cb2 (patch) | |
| tree | 5e87c4aa0f89b3148484f445bb7feec0fc003ef6 | |
| parent | 1d8099fd8cdad4ebbd8297a474bc7c7c0768660e (diff) | |
| download | vcpkg-39d6688e028d9831ac7c8c914c80d150b2e10cb2.tar.gz vcpkg-39d6688e028d9831ac7c8c914c80d150b2e10cb2.zip | |
install_plan_type -> InstallPlanType
| -rw-r--r-- | toolsrc/include/vcpkg_Dependencies.h | 6 | ||||
| -rw-r--r-- | toolsrc/src/commands_build.cpp | 4 | ||||
| -rw-r--r-- | toolsrc/src/commands_ci.cpp | 8 | ||||
| -rw-r--r-- | toolsrc/src/commands_install.cpp | 8 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg_Dependencies.cpp | 10 |
5 files changed, 18 insertions, 18 deletions
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 098c9925b..ea52ede7e 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -14,7 +14,7 @@ namespace vcpkg::Dependencies AUTO_SELECTED }; - enum class install_plan_type + enum class InstallPlanType { UNKNOWN, BUILD_AND_INSTALL, @@ -25,13 +25,13 @@ namespace vcpkg::Dependencies struct install_plan_action { install_plan_action(); - install_plan_action(const install_plan_type& plan_type, optional<BinaryParagraph> binary_pgh, optional<SourceParagraph> source_pgh); + install_plan_action(const InstallPlanType& plan_type, optional<BinaryParagraph> binary_pgh, optional<SourceParagraph> source_pgh); install_plan_action(const install_plan_action&) = delete; install_plan_action(install_plan_action&&) = default; install_plan_action& operator=(const install_plan_action&) = delete; install_plan_action& operator=(install_plan_action&&) = default; - install_plan_type plan_type; + InstallPlanType plan_type; optional<BinaryParagraph> binary_pgh; optional<SourceParagraph> source_pgh; }; diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 7376238cd..7d53c6c15 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Build { using Dependencies::package_spec_with_install_plan; - using Dependencies::install_plan_type; + using Dependencies::InstallPlanType; static const std::string OPTION_CHECKS_ONLY = "--checks-only"; @@ -148,7 +148,7 @@ namespace vcpkg::Commands::Build unmet_dependencies.erase( std::remove_if(unmet_dependencies.begin(), unmet_dependencies.end(), [&spec](const package_spec_with_install_plan& p) { - return (p.spec == spec) || (p.plan.plan_type == install_plan_type::ALREADY_INSTALLED); + return (p.spec == spec) || (p.plan.plan_type == InstallPlanType::ALREADY_INSTALLED); }), unmet_dependencies.end()); diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index f2a818f12..a25e5a469 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -11,7 +11,7 @@ namespace vcpkg::Commands::CI { using Dependencies::package_spec_with_install_plan; - using Dependencies::install_plan_type; + using Dependencies::InstallPlanType; using Build::BuildResult; static std::vector<PackageSpec> load_all_package_specs(const fs::path& ports_directory, const Triplet& target_triplet) @@ -55,12 +55,12 @@ namespace vcpkg::Commands::CI try { - if (action.plan.plan_type == install_plan_type::ALREADY_INSTALLED) + if (action.plan.plan_type == InstallPlanType::ALREADY_INSTALLED) { results.back() = BuildResult::SUCCEEDED; System::println(System::color::success, "Package %s is already installed", action.spec); } - else if (action.plan.plan_type == install_plan_type::BUILD_AND_INSTALL) + else if (action.plan.plan_type == InstallPlanType::BUILD_AND_INSTALL) { const BuildResult result = Commands::Build::build_package(action.plan.source_pgh.value_or_exit(VCPKG_LINE_INFO), action.spec, @@ -78,7 +78,7 @@ namespace vcpkg::Commands::CI Install::install_package(paths, bpgh, &status_db); System::println(System::color::success, "Package %s is installed", action.spec); } - else if (action.plan.plan_type == install_plan_type::INSTALL) + else if (action.plan.plan_type == InstallPlanType::INSTALL) { results.back() = BuildResult::SUCCEEDED; Install::install_package(paths, action.plan.binary_pgh.value_or_exit(VCPKG_LINE_INFO), &status_db); diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 3ff73e764..227f60a9f 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -12,7 +12,7 @@ namespace vcpkg::Commands::Install { using Dependencies::package_spec_with_install_plan; - using Dependencies::install_plan_type; + using Dependencies::InstallPlanType; static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryParagraph& bpgh) { @@ -217,14 +217,14 @@ namespace vcpkg::Commands::Install { try { - if (action.plan.plan_type == install_plan_type::ALREADY_INSTALLED) + if (action.plan.plan_type == InstallPlanType::ALREADY_INSTALLED) { if (std::find(specs.begin(), specs.end(), action.spec) != specs.end()) { System::println(System::color::success, "Package %s is already installed", action.spec); } } - else if (action.plan.plan_type == install_plan_type::BUILD_AND_INSTALL) + else if (action.plan.plan_type == InstallPlanType::BUILD_AND_INSTALL) { const Build::BuildResult result = Commands::Build::build_package(action.plan.source_pgh.value_or_exit(VCPKG_LINE_INFO), action.spec, @@ -241,7 +241,7 @@ namespace vcpkg::Commands::Install install_package(paths, bpgh, &status_db); System::println(System::color::success, "Package %s is installed", action.spec); } - else if (action.plan.plan_type == install_plan_type::INSTALL) + else if (action.plan.plan_type == InstallPlanType::INSTALL) { install_package(paths, action.plan.binary_pgh.value_or_exit(VCPKG_LINE_INFO), &status_db); System::println(System::color::success, "Package %s is installed", action.spec); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index a1ef606ba..7dda13e66 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -9,11 +9,11 @@ namespace vcpkg::Dependencies { - install_plan_action::install_plan_action() : plan_type(install_plan_type::UNKNOWN), binary_pgh(nullopt), source_pgh(nullopt) + install_plan_action::install_plan_action() : plan_type(InstallPlanType::UNKNOWN), binary_pgh(nullopt), source_pgh(nullopt) { } - install_plan_action::install_plan_action(const install_plan_type& plan_type, optional<BinaryParagraph> binary_pgh, optional<SourceParagraph> source_pgh) + install_plan_action::install_plan_action(const InstallPlanType& plan_type, optional<BinaryParagraph> binary_pgh, optional<SourceParagraph> source_pgh) : plan_type(std::move(plan_type)), binary_pgh(std::move(binary_pgh)), source_pgh(std::move(source_pgh)) { } @@ -68,7 +68,7 @@ namespace vcpkg::Dependencies auto it = status_db.find(spec); if (it != status_db.end() && (*it)->want == Want::INSTALL) { - was_examined.emplace(spec, install_plan_action{install_plan_type::ALREADY_INSTALLED, nullopt, nullopt }); + was_examined.emplace(spec, install_plan_action{InstallPlanType::ALREADY_INSTALLED, nullopt, nullopt }); continue; } @@ -76,7 +76,7 @@ namespace vcpkg::Dependencies if (BinaryParagraph* bpgh = maybe_bpgh.get()) { process_dependencies(bpgh->depends); - was_examined.emplace(spec, install_plan_action{install_plan_type::INSTALL, std::move(*bpgh), nullopt }); + was_examined.emplace(spec, install_plan_action{InstallPlanType::INSTALL, std::move(*bpgh), nullopt }); continue; } @@ -84,7 +84,7 @@ namespace vcpkg::Dependencies if (auto spgh = maybe_spgh.get()) { process_dependencies(filter_dependencies(spgh->depends, spec.target_triplet())); - was_examined.emplace(spec, install_plan_action{ install_plan_type::BUILD_AND_INSTALL, nullopt, std::move(*spgh) }); + was_examined.emplace(spec, install_plan_action{ InstallPlanType::BUILD_AND_INSTALL, nullopt, std::move(*spgh) }); } else { |
