diff options
| author | Daniel Shaw <t-dansha@microsoft.com> | 2017-07-25 21:29:31 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-08-16 15:10:50 -0700 |
| commit | 307b761df4197bf9cf1b69652808530e6219a868 (patch) | |
| tree | 40dc026ac1522df8268865703e1182b9036a029b /toolsrc/src/Paragraphs.cpp | |
| parent | bd7cd7f56d5d9fdfeb1f57810a2ea77bf4d7e31a (diff) | |
| download | vcpkg-307b761df4197bf9cf1b69652808530e6219a868.tar.gz vcpkg-307b761df4197bf9cf1b69652808530e6219a868.zip | |
partial end to end feature packages hdf5
added vcpkg feature package support to other commands
remove comments
change qualifier bracket to parens
added features to qualified dependencies
Diffstat (limited to 'toolsrc/src/Paragraphs.cpp')
| -rw-r--r-- | toolsrc/src/Paragraphs.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 3749e919e..3a30f66a3 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -3,6 +3,7 @@ #include "ParagraphParseResult.h" #include "Paragraphs.h" #include "vcpkg_Files.h" +#include "vcpkg_Util.h" using namespace vcpkg::Parse; @@ -226,14 +227,21 @@ namespace vcpkg::Paragraphs return error_info; } - Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) + Expected<BinaryControlFile> try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) { - Expected<std::unordered_map<std::string, std::string>> pghs = - get_single_paragraph(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); + Expected<std::vector<std::unordered_map<std::string, std::string>>> pghs = + get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); if (auto p = pghs.get()) { - return BinaryParagraph(*p); + BinaryControlFile bcf; + bcf.core_paragraph = BinaryParagraph(p->front()); + p->erase(p->begin()); + + bcf.features = + Util::fmap(*p, [&](auto&& raw_feature) -> BinaryParagraph { return BinaryParagraph(raw_feature); }); + + return bcf; } return pghs.error(); |
