From 307b761df4197bf9cf1b69652808530e6219a868 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Tue, 25 Jul 2017 21:29:31 -0700 Subject: 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 --- toolsrc/src/Paragraphs.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'toolsrc/src/Paragraphs.cpp') 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 try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) + Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) { - Expected> pghs = - get_single_paragraph(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); + Expected>> 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(); -- cgit v1.2.3 From e237682cad4eaa582a10b5ad03a59ca6449e0795 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 Aug 2017 16:17:53 -0700 Subject: Introduce GlobalState struct --- toolsrc/src/Paragraphs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toolsrc/src/Paragraphs.cpp') diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 3a30f66a3..a7dee4fd3 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_GlobalState.h" #include "vcpkg_Util.h" using namespace vcpkg::Parse; @@ -210,7 +211,7 @@ namespace vcpkg::Paragraphs if (auto vector_pghs = pghs.get()) { auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs)); - if (!g_feature_packages) + if (!GlobalState::feature_packages) { if (auto ptr = csf.get()) { -- cgit v1.2.3