diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2016-11-05 01:02:15 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2016-11-05 01:02:15 -0700 |
| commit | 7f336c746776daf2af95914ed25ff3d50a96b387 (patch) | |
| tree | 2251824d5db437212c34dd80229e8241964dd774 /toolsrc/src/commands_installation.cpp | |
| parent | e5152851f2bb070eb4bcc2b8968d40d48226b04e (diff) | |
| download | vcpkg-7f336c746776daf2af95914ed25ff3d50a96b387.tar.gz vcpkg-7f336c746776daf2af95914ed25ff3d50a96b387.zip | |
Enable qualified dependencies. Fix bug in internal 'build' command.
Added capability for CONTROL files to specify qualified dependencies, which are substring searched inside triplet names.
Fixed bug in internal 'build' command where if a package is already built, that built package's dependencies will be used to determine requirements for the build instead of the port directory's CONTROL file.
Diffstat (limited to 'toolsrc/src/commands_installation.cpp')
| -rw-r--r-- | toolsrc/src/commands_installation.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 022b87139..f6aeafa02 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -138,7 +138,16 @@ namespace vcpkg const package_spec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_target_triplet, example.c_str()); Input::check_triplet(spec.target_triplet(), paths); - std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, spec, status_db); + + // Explicitly load and use the portfile's build dependencies when resolving the build command (instead of a cached package's dependencies). + auto first_level_deps = get_unmet_package_build_dependencies(paths, spec, status_db); + std::vector<package_spec> first_level_deps_specs; + for (auto&& dep : first_level_deps) + { + first_level_deps_specs.push_back(package_spec::from_name_and_triplet(dep, spec.target_triplet()).get_or_throw()); + } + + std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, first_level_deps_specs, status_db); if (!unmet_dependencies.empty()) { System::println(System::color::error, "The build command requires all dependencies to be already installed."); |
