summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/spec.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index de00a3dd5b..40d5fae28c 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1462,6 +1462,13 @@ class Spec(object):
'module': self.external_module
}
+ d['concrete'] = self._concrete
+
+ if 'patches' in self.variants:
+ variant = self.variants['patches']
+ if hasattr(variant, '_patches_in_order_of_appearance'):
+ d['patches'] = variant._patches_in_order_of_appearance
+
# TODO: restore build dependencies here once we have less picky
# TODO: concretization.
if all_deps:
@@ -1553,6 +1560,19 @@ class Spec(object):
spec.external_path = None
spec.external_module = None
+ if 'concrete' in node:
+ spec._concrete = node['concrete']
+
+ if 'patches' in node:
+ patches = node['patches']
+ if len(patches) > 0:
+ mvar = spec.variants.setdefault(
+ 'patches', MultiValuedVariant('patches', ())
+ )
+ mvar.value = patches
+ # FIXME: Monkey patches mvar to store patches order
+ mvar._patches_in_order_of_appearance = patches
+
# Don't read dependencies here; from_node_dict() is used by
# from_yaml() to read the root *and* each dependency spec.