aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_installation.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-22 23:28:50 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-22 23:28:50 -0700
commit33a2969b9c80c602a28e0d53560f39915de933fc (patch)
treeb089646d2fadab7dfc52f6c3633e8ca4cee60b63 /toolsrc/src/commands_installation.cpp
parentaddecbfdefe9f00214db9af438b0fe255e92a16a (diff)
downloadvcpkg-33a2969b9c80c602a28e0d53560f39915de933fc.tar.gz
vcpkg-33a2969b9c80c602a28e0d53560f39915de933fc.zip
Refactor dependency related code to vcpkg::Dependencies
Diffstat (limited to 'toolsrc/src/commands_installation.cpp')
-rw-r--r--toolsrc/src/commands_installation.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp
index 36f26fdab..7004307b3 100644
--- a/toolsrc/src/commands_installation.cpp
+++ b/toolsrc/src/commands_installation.cpp
@@ -6,6 +6,7 @@
#include "vcpkg_Files.h"
#include "post_build_lint.h"
#include "vcpkg_System.h"
+#include "vcpkg_Dependencies.h"
namespace vcpkg
{
@@ -59,18 +60,19 @@ namespace vcpkg
{
StatusParagraphs status_db = database_load_check(paths);
- std::vector<package_spec> specs = args.extract_package_specs_with_unmet_dependencies(paths, default_target_triplet, status_db);
- Checks::check_exit(!specs.empty(), "Specs cannot be empty");
- std::string specs_string = to_string(specs[0]);
- for (size_t i = 1; i < specs.size(); ++i)
+ std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(default_target_triplet);
+ std::vector<package_spec> install_plan = Dependencies::create_dependency_ordered_install_plan(paths, specs, status_db);
+ Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
+ std::string specs_string = to_string(install_plan[0]);
+ for (size_t i = 1; i < install_plan.size(); ++i)
{
specs_string.push_back(',');
- specs_string.append(to_string(specs[i]));
+ specs_string.append(to_string(install_plan[i]));
}
TrackProperty("installplan", specs_string);
Environment::ensure_utilities_on_path(paths);
- for (const package_spec& spec : specs)
+ for (const package_spec& spec : install_plan)
{
if (status_db.find_installed(spec.name, spec.target_triplet) != status_db.end())
{