aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/agent.cxx')
-rw-r--r--bbot/agent.cxx34
1 files changed, 18 insertions, 16 deletions
diff --git a/bbot/agent.cxx b/bbot/agent.cxx
index d30799f..bb0ccb7 100644
--- a/bbot/agent.cxx
+++ b/bbot/agent.cxx
@@ -91,10 +91,10 @@ bootstrap_machine (const dir_path& md,
toolchain_manifest {tc_id.empty () ? "bogus" : tc_id},
bootstrap_manifest {
bootstrap_manifest::versions_type {
- {"bbot", BBOT_VERSION},
- {"libbbot", LIBBBOT_VERSION},
- {"libbpkg", LIBBPKG_VERSION},
- {"libbutl", LIBBUTL_VERSION}
+ {"bbot", standard_version (BBOT_VERSION_STR)},
+ {"libbbot", standard_version (LIBBBOT_VERSION_STR)},
+ {"libbpkg", standard_version (LIBBPKG_VERSION_STR)},
+ {"libbutl", standard_version (LIBBUTL_VERSION_STR)}
}
}
};
@@ -415,13 +415,14 @@ try
//
auto compare_bbot = [] (const bootstrap_manifest& m) -> int
{
- auto cmp = [&m] (const string& n, uint64_t v) -> int
+ auto cmp = [&m] (const string& n, const char* v) -> int
{
+ standard_version sv (v);
auto i = m.versions.find (n);
- return
- i == m.versions.end () || i->second < v
- ? -1
- : i->second > v ? 1 : 0;
+
+ return (i == m.versions.end () || i->second < sv
+ ? -1
+ : i->second > sv ? 1 : 0);
};
// Start from the top assuming a new dependency cannot be added
@@ -429,10 +430,10 @@ try
//
int r;
return
- (r = cmp ("bbot", BBOT_VERSION)) != 0 ? r :
- (r = cmp ("libbbot", LIBBBOT_VERSION)) != 0 ? r :
- (r = cmp ("libbpkg", LIBBPKG_VERSION)) != 0 ? r :
- (r = cmp ("libbutl", LIBBUTL_VERSION)) != 0 ? r : 0;
+ (r = cmp ("bbot", BBOT_VERSION_STR)) != 0 ? r :
+ (r = cmp ("libbbot", LIBBBOT_VERSION_STR)) != 0 ? r :
+ (r = cmp ("libbpkg", LIBBPKG_VERSION_STR)) != 0 ? r :
+ (r = cmp ("libbutl", LIBBUTL_VERSION_STR)) != 0 ? r : 0;
};
optional<bootstrapped_machine_manifest> bmm;
@@ -777,9 +778,10 @@ try
//
if (ops.version ())
{
- cout << "bbot-agent " << BBOT_VERSION_STR << endl
- << "libbbot " << LIBBBOT_VERSION_STR << endl
- << "libbutl " << LIBBUTL_VERSION_STR << endl
+ cout << "bbot-agent " << BBOT_VERSION_ID << endl
+ << "libbbot " << LIBBBOT_VERSION_ID << endl
+ << "libbpkg " << LIBBBOT_VERSION_ID << endl
+ << "libbutl " << LIBBUTL_VERSION_ID << endl
<< "Copyright (c) 2014-2017 Code Synthesis Ltd" << endl
<< "TBC; All rights reserved" << endl;