diff options
| author | Daniel Shaw <t-dansha@microsoft.com> | 2017-06-26 13:48:04 -0700 |
|---|---|---|
| committer | Daniel Shaw <t-dansha@microsoft.com> | 2017-06-26 15:36:57 -0700 |
| commit | 838e8783d659456037c0e8e89dcc689e626b6816 (patch) | |
| tree | 7398f92bf58d5ace733c33f20a6b852bd0e82ea3 /toolsrc/include | |
| parent | 0f0234eed88c800586979071e0637cfc4c2d9c8c (diff) | |
| download | vcpkg-838e8783d659456037c0e8e89dcc689e626b6816.tar.gz vcpkg-838e8783d659456037c0e8e89dcc689e626b6816.zip | |
adding tests for install plans
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg_Dependencies.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 018c4f5cf..da31aa4bf 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -97,7 +97,24 @@ namespace vcpkg::Dependencies RequestType request_type; }; - std::vector<InstallPlanAction> create_install_plan(const VcpkgPaths& paths, + __interface PortFileProvider { virtual const SourceControlFile* get_control_file(const PackageSpec& spec) const; }; + + struct MapPortFile : PortFileProvider + { + const std::unordered_map<PackageSpec, SourceControlFile>& ports; + explicit MapPortFile(const std::unordered_map<PackageSpec, SourceControlFile>& map); + const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + }; + + struct PathsPortFile : PortFileProvider + { + const VcpkgPaths& ports; + mutable std::unordered_map<PackageSpec, SourceControlFile> cache; + explicit PathsPortFile(const VcpkgPaths& paths); + const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + }; + + std::vector<InstallPlanAction> create_install_plan(const PortFileProvider& port_file_provider, const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db); |
