aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorDaniel Shaw <t-dansha@microsoft.com>2017-07-25 21:29:31 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-08-16 15:10:50 -0700
commit307b761df4197bf9cf1b69652808530e6219a868 (patch)
tree40dc026ac1522df8268865703e1182b9036a029b /toolsrc/include
parentbd7cd7f56d5d9fdfeb1f57810a2ea77bf4d7e31a (diff)
downloadvcpkg-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/include')
-rw-r--r--toolsrc/include/BinaryParagraph.h6
-rw-r--r--toolsrc/include/Paragraphs.h2
-rw-r--r--toolsrc/include/SourceParagraph.h15
-rw-r--r--toolsrc/include/StatusParagraphs.h3
-rw-r--r--toolsrc/include/vcpkg_Commands.h2
-rw-r--r--toolsrc/include/vcpkg_Dependencies.h5
6 files changed, 28 insertions, 5 deletions
diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h
index 1e12dd8a6..61e03343a 100644
--- a/toolsrc/include/BinaryParagraph.h
+++ b/toolsrc/include/BinaryParagraph.h
@@ -31,5 +31,11 @@ namespace vcpkg
std::vector<std::string> depends;
};
+ struct BinaryControlFile
+ {
+ BinaryParagraph core_paragraph;
+ std::vector<BinaryParagraph> features;
+ };
+
void serialize(const BinaryParagraph& pgh, std::string& out_str);
} \ No newline at end of file
diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h
index 60f509266..aae46f7da 100644
--- a/toolsrc/include/Paragraphs.h
+++ b/toolsrc/include/Paragraphs.h
@@ -20,7 +20,7 @@ namespace vcpkg::Paragraphs
Parse::ParseExpected<SourceControlFile> try_load_port(const Files::Filesystem& fs, const fs::path& control_path);
- 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);
struct LoadResults
{
diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h
index 7ddf999cc..fee61c3e8 100644
--- a/toolsrc/include/SourceParagraph.h
+++ b/toolsrc/include/SourceParagraph.h
@@ -15,13 +15,24 @@ namespace vcpkg
struct Triplet;
- struct Dependency
+ struct Features
{
std::string name;
+ std::vector<std::string> features;
+ };
+
+ Features parse_feature_list(const std::string& name);
+
+ struct Dependency
+ {
+ Features depend;
std::string qualifier;
+
+ std::string name() const;
+ static Dependency parse_dependency(std::string name, std::string qualifier);
};
- const std::string& to_string(const Dependency& dep);
+ const std::string to_string(const Dependency& dep);
struct FeatureParagraph
{
diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h
index 2af177219..bf2ef2f3e 100644
--- a/toolsrc/include/StatusParagraphs.h
+++ b/toolsrc/include/StatusParagraphs.h
@@ -17,6 +17,9 @@ namespace vcpkg
const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); }
const_iterator find(const std::string& name, const Triplet& triplet) const;
iterator find(const std::string& name, const Triplet& triplet);
+ std::vector<std::unique_ptr<StatusParagraph>*> StatusParagraphs::find_all(const std::string& name,
+ const Triplet& triplet);
+ iterator find(const std::string& name, const Triplet& triplet, const std::string& feature);
const_iterator find_installed(const PackageSpec& spec) const
{
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 8348a64e4..d5f316d69 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -59,7 +59,7 @@ namespace vcpkg::Commands
const fs::path& source_dir,
const InstallDir& dirs);
void install_package(const VcpkgPaths& paths,
- const BinaryParagraph& binary_paragraph,
+ const BinaryControlFile& binary_paragraph,
StatusParagraphs* status_db);
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
}
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h
index e3af0fd28..3fee8ef33 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg_Dependencies.h
@@ -90,6 +90,7 @@ namespace vcpkg::Dependencies
InstallPlanAction(InstallPlanAction&&) = default;
InstallPlanAction& operator=(const InstallPlanAction&) = delete;
InstallPlanAction& operator=(InstallPlanAction&&) = default;
+ std::string displayname() const;
PackageSpec spec;
AnyParagraph any_paragraph;
@@ -205,7 +206,9 @@ namespace vcpkg::Dependencies
std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster,
GraphPlan& graph_plan);
void mark_minus(Cluster& cluster, std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster, GraphPlan& graph_plan);
-
+ void mark_plus_default(Cluster& cluster,
+ std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster,
+ GraphPlan& graph_plan);
std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<PackageSpec, SourceControlFile>& map,
const std::vector<FullPackageSpec>& specs,
const StatusParagraphs& status_db);