diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-04-16 22:47:22 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-04-25 20:07:44 +0300 |
commit | 45218bf14ea1e8041b303bea313c939e1ec77a91 (patch) | |
tree | 26caa86adcc1df65199408f4edd2979f17901149 /libbpkg/manifest.hxx | |
parent | a792e92355b40b66b53908fb29cf6bb5cd18a083 (diff) |
Add package_manifest::override() overriding build* values
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r-- | libbpkg/manifest.hxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index df9247b..8dca593 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -636,7 +636,7 @@ namespace bpkg effective_project () const noexcept {return project ? *project : name;} public: - package_manifest () = default; // VC export. + package_manifest () = default; // Create individual manifest. // @@ -681,6 +681,31 @@ namespace bpkg bool complete_depends, package_manifest_flags); + // Override manifest values with the specified. Throw manifest_parsing if + // any value is invalid, cannot be overridden, or its name is not + // recognized. + // + // The specified values override the whole groups they belong to, + // resetting all the group values prior to being applied. Currently, only + // the following value groups can be overridden: {build-*email} and + // {builds, build-{include,exclude}}. + // + // If a non-empty source name is specified, then the specified values are + // assumed to also include the line/column information and the possibly + // thrown manifest_parsing exception will contain the invalid value + // location information. Otherwise, the exception description will refer + // to the invalid value name instead. + // + void + override (const std::vector<butl::manifest_name_value>&, + const std::string& source_name); + + // Validate the overrides without applying them to any manifest. + // + static void + validate_overrides (const std::vector<butl::manifest_name_value>&, + const std::string& source_name); + void serialize (butl::manifest_serializer&) const; |