diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-01 16:24:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-01 16:24:12 +0200 |
commit | 1b9d5cd435b800adad6432bca91cac189ad58823 (patch) | |
tree | c43a2b4c2c45b6ed5c2ef4e17cd573f2d10d992f /bbot/bootstrap-manifest.cxx | |
parent | 6cabe4d21b49ea149e6694c7290ff3e1fa9e08d2 (diff) |
Use standard version in bootstrap manifest
Diffstat (limited to 'bbot/bootstrap-manifest.cxx')
-rw-r--r-- | bbot/bootstrap-manifest.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/bbot/bootstrap-manifest.cxx b/bbot/bootstrap-manifest.cxx index 0d6e6b5..ebbc7ce 100644 --- a/bbot/bootstrap-manifest.cxx +++ b/bbot/bootstrap-manifest.cxx @@ -75,15 +75,17 @@ namespace bbot // Package version. // - size_t vn; - uint64_t pv (stoull (v, &vn)); - if (vn != v.size ()) - bad_value ("invalid package version"); - - // Make sure the package version is not redefined. - // - if (!versions.emplace (move (pn), pv).second) - bad_name (n + " redefinition"); + try + { + // Make sure the package version is not redefined. + // + if (!versions.emplace (move (pn), standard_version (v)).second) + bad_name (n + " redefinition"); + } + catch (const invalid_argument& e) + { + bad_value (string ("invalid package version: ") + e.what ()); + } } else if (!iu) bad_name ("unknown name '" + n + "' in bootstrap manifest"); @@ -105,7 +107,7 @@ namespace bbot // Serialize *-version values. // for (const auto& v: versions) - s.next (v.first + "-version", to_string (v.second)); + s.next (v.first + "-version", v.second.string_project ()); s.next ("", ""); // End of manifest. } |