From f55667e8f763979228ece6651adcf3063ec22523 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Oct 2021 10:44:51 +0300 Subject: Ignore build2/bpkg runtime dependencies while verifying package manifest compatibility with current toolchain --- bpkg/pkg-verify.cxx | 79 +++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/bpkg/pkg-verify.cxx b/bpkg/pkg-verify.cxx index 4cfaa85..0afe32b 100644 --- a/bpkg/pkg-verify.cxx +++ b/bpkg/pkg-verify.cxx @@ -56,65 +56,60 @@ namespace bpkg { dependency_alternatives da (nv.value); - for (dependency& d: da) + if (da.buildtime) { - const package_name& dn (d.name); - - if (dn != "build2" && dn != "bpkg") - continue; - - if (!da.buildtime) + for (dependency& d: da) { - if (diag_level != 0) - error (p.name (), nv.value_line, nv.value_column) - << dn << " dependency must be build-time"; + const package_name& dn (d.name); - throw failed (); - } + if (dn != "build2" && dn != "bpkg") + continue; - if (da.size () != 1) - { - if (diag_level != 0) - error (p.name (), nv.value_line, nv.value_column) - << "alternatives in " << dn << " dependency"; + if (da.size () != 1) + { + if (diag_level != 0) + error (p.name (), nv.value_line, nv.value_column) + << "alternatives in " << dn << " dependency"; - throw failed (); - } + throw failed (); + } - if (dn == "build2") - { - if (d.constraint && !satisfy_build2 (co, d)) + if (dn == "build2") { - if (diag_level != 0) + if (d.constraint && !satisfy_build2 (co, d)) { - diag_record dr (error); - dr << "unable to satisfy constraint (" << d << ")"; + if (diag_level != 0) + { + diag_record dr (error); + dr << "unable to satisfy constraint (" << d << ")"; - if (!what.empty ()) - dr << " for package " << what; + if (!what.empty ()) + dr << " for package " << what; - dr << info << "available build2 version is " << build2_version; - } + dr << info << "available build2 version is " + << build2_version; + } - throw failed (); + throw failed (); + } } - } - else - { - if (d.constraint && !satisfy_bpkg (co, d)) + else { - if (diag_level != 0) + if (d.constraint && !satisfy_bpkg (co, d)) { - diag_record dr (error); - dr << "unable to satisfy constraint (" << d << ")"; + if (diag_level != 0) + { + diag_record dr (error); + dr << "unable to satisfy constraint (" << d << ")"; - if (!what.empty ()) - dr << " for package " << what; + if (!what.empty ()) + dr << " for package " << what; - dr << "available bpkg version is " << bpkg_version; - } + dr << "available bpkg version is " << bpkg_version; + } - throw failed (); + throw failed (); + } } } } -- cgit v1.1