aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-12-22 22:44:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-15 13:24:47 +0300
commit61ee1e83cca30abbd37f91eaa846d64cee81e9a4 (patch)
tree6aabdc82406d09bc27751a11307b252956957ba8
parent5cee038743e1e149226d5b0b1a68a782182a4e33 (diff)
Add support for $ in package manifest dependency constraint
-rw-r--r--load/load.cxx18
1 files 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<repository>& 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 &&