aboutsummaryrefslogtreecommitdiff
path: root/bbot/bootstrap-manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:21:12 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:26:21 +0300
commit0ffb0a1a0a13d07c4448f7752232d8854b790623 (patch)
tree9d1e173375d53e05c52568dc69633ed98697190d /bbot/bootstrap-manifest.hxx
parent1364413cee696ff60f4dd1e3ac1eb281ac7a4e8f (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'bbot/bootstrap-manifest.hxx')
-rw-r--r--bbot/bootstrap-manifest.hxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/bbot/bootstrap-manifest.hxx b/bbot/bootstrap-manifest.hxx
new file mode 100644
index 0000000..9d583ad
--- /dev/null
+++ b/bbot/bootstrap-manifest.hxx
@@ -0,0 +1,50 @@
+// file : bbot/bootstrap-manifest.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : TBC; see accompanying LICENSE file
+
+#ifndef BBOT_BOOTSTRAP_MANIFEST_HXX
+#define BBOT_BOOTSTRAP_MANIFEST_HXX
+
+#include <map>
+
+#include <butl/manifest-forward>
+
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
+
+namespace bbot
+{
+ // Bootstrap result manifest. Uploaded by the worker to the agent's TFTP
+ // server.
+ //
+ class bootstrap_manifest
+ {
+ public:
+
+ // Map of packages to their (numeric) versions that were used inside the
+ // bootstrapped machine. Used to make sure bbot agent/worker use the same
+ // versions. For example:
+ //
+ // libbbot-version: 1010100 # 1.1.1
+ // bbot-version: 1010200 # 1.1.2
+ //
+ using versions_type = std::map<string, uint64_t>;
+ versions_type versions;
+
+ explicit
+ bootstrap_manifest (versions_type v)
+ : versions (move (v)) {}
+
+ public:
+ bootstrap_manifest () = default; // VC export.
+ bootstrap_manifest (butl::manifest_parser&, bool ignore_unknown = false);
+ bootstrap_manifest (butl::manifest_parser&,
+ butl::manifest_name_value start,
+ bool ignore_unknown = false);
+
+ void
+ serialize (butl::manifest_serializer&) const;
+ };
+}
+
+#endif // BBOT_BOOTSTRAP_MANIFEST_HXX