summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-11-05 23:25:40 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2018-11-09 00:31:24 -0800
commit562482d9cc47b2b689a3540538942d35e7c60f53 (patch)
tree37a02963f59e30ee349a6244bcdcf66c2835a5af /lib
parent13164b114afb53eac9e41870acf865928161929c (diff)
downloadspack-562482d9cc47b2b689a3540538942d35e7c60f53.tar.gz
spack-562482d9cc47b2b689a3540538942d35e7c60f53.tar.bz2
spack-562482d9cc47b2b689a3540538942d35e7c60f53.tar.xz
spack-562482d9cc47b2b689a3540538942d35e7c60f53.zip
env: only add `concrete` attribute to abstract specs
- to aovid changing spec hashes drastically, only add this attribute to differentiated abstract specs. - othherwise assume that read-in specs are concrete
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 084b8176ec..f8991413cd 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1462,7 +1462,8 @@ class Spec(object):
'module': self.external_module
}
- d['concrete'] = self._concrete
+ if not self._concrete:
+ d['concrete'] = False
if 'patches' in self.variants:
variant = self.variants['patches']
@@ -1560,8 +1561,8 @@ class Spec(object):
spec.external_path = None
spec.external_module = None
- if 'concrete' in node:
- spec._concrete = node['concrete']
+ # specs read in are concrete unless marked abstract
+ spec._concrete = node.get('concrete', True)
if 'patches' in node:
patches = node['patches']