From b48fc390bc1c6fa289f821bac0380267762d1238 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 9 Oct 2021 22:05:40 +0300 Subject: Verify package manifest compatibility with current toolchain --- bpkg/satisfaction.cxx | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'bpkg/satisfaction.cxx') 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); } } -- cgit v1.1