aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-13 10:44:51 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-13 10:44:51 +0300
commitf55667e8f763979228ece6651adcf3063ec22523 (patch)
treee2889e22dc3ea12a912009dc5ada77c473907d9d
parent191f303ce2ee5de042a48801273cbc57a6dd0a52 (diff)
Ignore build2/bpkg runtime dependencies while verifying package manifest compatibility with current toolchain
-rw-r--r--bpkg/pkg-verify.cxx79
1 files 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 ();
+ }
}
}
}