summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-10-31 22:30:28 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2020-11-17 10:04:13 -0800
commitccb537479a72640885b69ffaca263a5f3409f9d1 (patch)
treee6ee459e519ea90a0f09b3f7c66113837ec57da4
parent27bb970a97858a6ac812c34ba2feeafbddb7e4c0 (diff)
downloadspack-ccb537479a72640885b69ffaca263a5f3409f9d1.tar.gz
spack-ccb537479a72640885b69ffaca263a5f3409f9d1.tar.bz2
spack-ccb537479a72640885b69ffaca263a5f3409f9d1.tar.xz
spack-ccb537479a72640885b69ffaca263a5f3409f9d1.zip
install: one less concretization when installing from file
-rw-r--r--lib/spack/spack/cmd/install.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 8803a9f312..c8673b5330 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -367,14 +367,15 @@ environment variables:
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.')