diff options
Diffstat (limited to 'load')
-rw-r--r-- | load/load.cxx | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/load/load.cxx b/load/load.cxx index 9e6ee5d..e2a318c 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -591,20 +591,32 @@ resolve_dependencies (package& p, database& db) { auto c (*d.constraint); - if (c.min_version) + if (c.min_version && c.max_version && *c.min_version == *c.max_version) { - if (c.min_open) - q = q && vm > *c.min_version; - else - q = q && vm >= *c.min_version; + const version& v (*c.min_version); + q = q && compare_version_eq (vm, v, v.revision != 0); } - - if (c.max_version) + else { - if (c.max_open) - q = q && vm < *c.max_version; - else - q = q && vm <= *c.max_version; + if (c.min_version) + { + const version& v (*c.min_version); + + if (c.min_open) + q = q && compare_version_gt (vm, v, v.revision != 0); + else + q = q && compare_version_ge (vm, v, v.revision != 0); + } + + if (c.max_version) + { + const version& v (*c.max_version); + + if (c.max_open) + q = q && compare_version_lt (vm, v, v.revision != 0); + else + q = q && compare_version_le (vm, v, v.revision != 0); + } } } |