aboutsummaryrefslogtreecommitdiff
path: root/bpkg/satisfaction.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-09 22:05:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-12 14:20:53 +0300
commitb48fc390bc1c6fa289f821bac0380267762d1238 (patch)
tree9944de53a4c11a8948e59d5fe5fb44a150a6aed8 /bpkg/satisfaction.cxx
parent6beb03862724e444bf24c92031e47814c9949ae2 (diff)
Verify package manifest compatibility with current toolchain
Diffstat (limited to 'bpkg/satisfaction.cxx')
-rw-r--r--bpkg/satisfaction.cxx26
1 files changed, 8 insertions, 18 deletions
diff --git a/bpkg/satisfaction.cxx b/bpkg/satisfaction.cxx
index 52def32..cbcb5a0 100644
--- a/bpkg/satisfaction.cxx
+++ b/bpkg/satisfaction.cxx
@@ -128,12 +128,10 @@ namespace bpkg
return s;
}
- static version build2_version;
+ version build2_version;
- void
- satisfy_build2 (const common_options& o,
- const package_name& pkg,
- const dependency& d)
+ bool
+ satisfy_build2 (const common_options& o, const dependency& d)
{
assert (d.name == "build2");
@@ -180,18 +178,13 @@ namespace bpkg
fail << "unable to determine build2 version of " << name_b (o);
}
- if (!satisfies (build2_version, d.constraint))
- fail << "unable to satisfy constraint (" << d << ") for package "
- << pkg <<
- info << "available build2 version is " << build2_version;
+ return satisfies (build2_version, d.constraint);
}
- static version bpkg_version;
+ version bpkg_version;
- void
- satisfy_bpkg (const common_options&,
- const package_name& pkg,
- const dependency& d)
+ bool
+ satisfy_bpkg (const common_options&, const dependency& d)
{
assert (d.name == "bpkg");
@@ -200,9 +193,6 @@ namespace bpkg
if (bpkg_version.empty ())
bpkg_version = version (BPKG_VERSION_STR);
- if (!satisfies (bpkg_version, d.constraint))
- fail << "unable to satisfy constraint (" << d << ") for package "
- << pkg <<
- info << "available bpkg version is " << bpkg_version;
+ return satisfies (bpkg_version, d.constraint);
}
}