install: one less concretization when installing from file
This commit is contained in:
parent
27bb970a97
commit
ccb537479a
@ -367,14 +367,15 @@ def install(parser, args, **kwargs):
|
||||
with open(file, 'r') as f:
|
||||
s = spack.spec.Spec.from_yaml(f)
|
||||
|
||||
if s.concretized().dag_hash() != s.dag_hash():
|
||||
concretized = s.concretized()
|
||||
if concretized.dag_hash() != s.dag_hash():
|
||||
msg = 'skipped invalid file "{0}". '
|
||||
msg += 'The file does not contain a concrete spec.'
|
||||
tty.warn(msg.format(file))
|
||||
continue
|
||||
|
||||
abstract_specs.append(s)
|
||||
specs.append(s.concretized())
|
||||
specs.append(concretized)
|
||||
|
||||
if len(specs) == 0:
|
||||
tty.die('The `spack install` command requires a spec to install.')
|
||||
|
Loading…
Reference in New Issue
Block a user