From 21036163f37ba0d60d47628b7139ed13f34ef458 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 18 Apr 2017 10:09:00 +0200 Subject: Various minor manifest extensions --- bbot/manifest | 19 ++++++++++++++++++- bbot/variable | 3 +-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bbot/manifest b/bbot/manifest index 44e2662..4a5561a 100644 --- a/bbot/manifest +++ b/bbot/manifest @@ -21,6 +21,8 @@ namespace bbot { + using strings = std::vector; + class LIBBBOT_EXPORT machine_header_manifest { public: @@ -86,6 +88,7 @@ namespace bbot std::string name; bpkg::version version; bpkg::repository_location repository; // Remote or absolute. + strings trust; // Build machine to use for building the package. // @@ -180,13 +183,22 @@ namespace bbot operator<< (std::ostream& os, result_status s) {return os << to_string (s);} inline result_status& - operator |= (result_status& l, result_status r) + operator|= (result_status& l, result_status r) { if (static_cast (r) > static_cast (l)) l = r; return l; } + // Return true if the result is "bad", that is, error or worse. + // + inline bool + operator! (result_status s) + { + return static_cast (s) >= + static_cast (result_status::error); + } + struct operation_result { std::string operation; // "configure", "update", "test", etc. @@ -201,6 +213,11 @@ namespace bbot public: // Built package. // + // If the version is 0 (which signifies a stub package that cannot be + // possibly built) then both name and version are "unknown". This is used + // by the worker to signal abnormal termination before being able to + // obtain the package name/version. + // std::string name; bpkg::version version; diff --git a/bbot/variable b/bbot/variable index c210dc0..556cc09 100644 --- a/bbot/variable +++ b/bbot/variable @@ -27,8 +27,7 @@ namespace bbot // String in the name=value format. Can contain single or double quoted // substrings. No escaping is supported. The name must not contain spaces. - // Throw variable_error if the string doesn't conform with the above - // constraints. + // Throw variable_error if the string doesn't conform to these rules. // struct LIBBBOT_EXPORT variable: std::string { -- cgit v1.1