aboutsummaryrefslogtreecommitdiff
path: root/bbot/manifest
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-18 10:09:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-18 10:09:00 +0200
commit21036163f37ba0d60d47628b7139ed13f34ef458 (patch)
treea51ee9ce2df10590ddf29d8c3e2f96c3a4e81e51 /bbot/manifest
parentd544a5a6d05a0fb3494ba063ea685b740825aa86 (diff)
Various minor manifest extensions
Diffstat (limited to 'bbot/manifest')
-rw-r--r--bbot/manifest19
1 files changed, 18 insertions, 1 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;