aboutsummaryrefslogtreecommitdiff
path: root/load
diff options
context:
space:
mode:
Diffstat (limited to 'load')
-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);
}
}