Fix lack of sorting in version concretization.

This commit is contained in:
Todd Gamblin 2014-12-25 23:13:44 -08:00
parent b0ce1b81ba
commit d3e52d9f9a

View File

@ -68,8 +68,9 @@ def concretize_version(self, spec):
# If there are known avaialble versions, return the most recent
# version that satisfies the spec
pkg = spec.package
valid_versions = [v for v in pkg.versions
if any(v.satisfies(sv) for sv in spec.versions)]
valid_versions = sorted(
[v for v in pkg.versions
if any(v.satisfies(sv) for sv in spec.versions)])
if valid_versions:
spec.versions = ver([valid_versions[-1]])