diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-18 10:09:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-18 10:09:00 +0200 |
commit | 21036163f37ba0d60d47628b7139ed13f34ef458 (patch) | |
tree | a51ee9ce2df10590ddf29d8c3e2f96c3a4e81e51 /bbot | |
parent | d544a5a6d05a0fb3494ba063ea685b740825aa86 (diff) |
Various minor manifest extensions
Diffstat (limited to 'bbot')
-rw-r--r-- | bbot/manifest | 19 | ||||
-rw-r--r-- | 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<std::string>; + 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<std::uint8_t> (r) > static_cast<std::uint8_t> (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<std::uint8_t> (s) >= + static_cast<std::uint8_t> (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 { |