summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-12-25 23:13:44 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2014-12-25 23:13:44 -0800
commitd3e52d9f9ac04c5e0e80ad08e57c7f13862b84c1 (patch)
tree112ce09b753cd6a810f79e1ed69181a795d36400 /lib
parentb0ce1b81bae627cc9d3e7853683be60b0f47dbed (diff)
downloadspack-d3e52d9f9ac04c5e0e80ad08e57c7f13862b84c1.tar.gz
spack-d3e52d9f9ac04c5e0e80ad08e57c7f13862b84c1.tar.bz2
spack-d3e52d9f9ac04c5e0e80ad08e57c7f13862b84c1.tar.xz
spack-d3e52d9f9ac04c5e0e80ad08e57c7f13862b84c1.zip
Fix lack of sorting in version concretization.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/concretize.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 805604368e..3f569f9dce 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -68,8 +68,9 @@ class DefaultConcretizer(object):
# 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]])