From 61ee1e83cca30abbd37f91eaa846d64cee81e9a4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 22 Dec 2018 22:44:30 +0300 Subject: Add support for $ in package manifest dependency constraint --- load/load.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/load/load.cxx b/load/load.cxx index 9316300..1865c3d 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -369,15 +369,18 @@ load_packages (const shared_ptr& rp, database& db) // if (cl.type () != repository_type::pkg) { - // We put no restrictions on the manifest values present since it's not + // We put no restrictions on the manifest values presence since it's not // critical for displaying and building if the packages omit some - // manifest values (see libbpkg/manifest.hxx for details). + // manifest values (see libbpkg/manifest.hxx for details). Note, though, + // that we expect package dependency constraints to be complete. // for (manifest_name_value nv (mp.next ()); !nv.empty (); nv = mp.next ()) - pms.emplace_back (mp, - move (nv), - false /* ignore_unknown */, - package_manifest_flags::none); + pms.emplace_back ( + mp, + move (nv), + false /* ignore_unknown */, + false /* complete_depends */, + package_manifest_flags::forbid_incomplete_depends); } else pms = pkg_package_manifests (mp); @@ -796,6 +799,9 @@ resolve_dependencies (package& p, database& db) if (d.constraint) { auto c (*d.constraint); + + assert (c.complete ()); + query qs (compare_version_eq (vm, wildcard_version, false)); if (c.min_version && c.max_version && -- cgit v1.1