Skip to content

Commit 4181bc7

Browse files
committed
Fixed issue with reindex and a failing unit test
1 parent 1f77c42 commit 4181bc7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/spack/spack/spec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,9 @@ def read_yaml_dep_specs(dependency_dict):
17891789
elif isinstance(elt, dict):
17901790
# new format: elements of dependency spec are keyed.
17911791
dag_hash, deptypes = elt['hash'], elt['type']
1792-
virtuals = elt['provides']
1792+
# {}.get instead of subscripting is needed for backward
1793+
# compatibility. Without it reindex would fail
1794+
virtuals = elt.get('provides', [])
17931795
else:
17941796
raise spack.error.SpecError(
17951797
"Couldn't parse dependency types in spec.")

lib/spack/spack/test/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _spec(spec, force):
190190
spec = spack.spec.Spec('mpi').concretized()
191191
return {spec: None}
192192

193-
spec = spack.spec.Spec('intel-parallel-studio')
193+
spec = spack.spec.Spec('mpich')
194194
spec.concretize()
195195

196196
monkeypatch.setattr(spack.binary_distribution, 'get_spec', _spec)

0 commit comments

Comments
 (0)