aboutsummaryrefslogtreecommitdiff
path: root/load/load.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-08-30 00:00:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-08-30 00:56:59 +0300
commit321fa79e78c17bdb1e3e27f6e8b9d019201584a1 (patch)
treef6078ad550bebb3aea764234a64639fd3277bd1c /load/load.cxx
parent38bb6be4c90c7fbf95b8e5345de21175d3f1ebd7 (diff)
Support stubs in loader
Diffstat (limited to 'load/load.cxx')
-rw-r--r--load/load.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/load/load.cxx b/load/load.cxx
index 2e06644..3b19ae3 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -695,23 +695,26 @@ resolve_dependencies (package& p, database& db)
if (d.constraint)
{
auto c (*d.constraint);
+ query qs (compare_version_eq (vm, wildcard_version, false));
if (c.min_version && c.max_version &&
*c.min_version == *c.max_version)
{
const version& v (*c.min_version);
- q = q && compare_version_eq (vm, v, v.revision != 0);
+ q = q && (compare_version_eq (vm, v, v.revision != 0) || qs);
}
else
{
+ query qr (true);
+
if (c.min_version)
{
const version& v (*c.min_version);
if (c.min_open)
- q = q && compare_version_gt (vm, v, v.revision != 0);
+ qr = compare_version_gt (vm, v, v.revision != 0);
else
- q = q && compare_version_ge (vm, v, v.revision != 0);
+ qr = compare_version_ge (vm, v, v.revision != 0);
}
if (c.max_version)
@@ -719,10 +722,12 @@ resolve_dependencies (package& p, database& db)
const version& v (*c.max_version);
if (c.max_open)
- q = q && compare_version_lt (vm, v, v.revision != 0);
+ qr = qr && compare_version_lt (vm, v, v.revision != 0);
else
- q = q && compare_version_le (vm, v, v.revision != 0);
+ qr = qr && compare_version_le (vm, v, v.revision != 0);
}
+
+ q = q && (qr || qs);
}
}