Working properly to display but not reuse old specs from yaml
This commit is contained in:
parent
06b9433351
commit
1523ebe9f7
1 changed files with 5 additions and 7 deletions
|
@ -755,8 +755,7 @@ def dag_hash(self, length=None):
|
||||||
"""
|
"""
|
||||||
Return a hash of the entire spec DAG, including connectivity.
|
Return a hash of the entire spec DAG, including connectivity.
|
||||||
"""
|
"""
|
||||||
print self, "++"
|
if self.hash:
|
||||||
if getattr(self, 'hash', None):
|
|
||||||
return self.hash
|
return self.hash
|
||||||
else:
|
else:
|
||||||
yaml_text = yaml.dump(
|
yaml_text = yaml.dump(
|
||||||
|
@ -769,8 +768,7 @@ def dag_hash(self, length=None):
|
||||||
|
|
||||||
def to_node_dict(self):
|
def to_node_dict(self):
|
||||||
params = dict( (name, v.value) for name, v in self.variants.items() )
|
params = dict( (name, v.value) for name, v in self.variants.items() )
|
||||||
params.update( dict( (name, []) for name in FlagMap.valid_compiler_flags() ) )
|
params.update( dict( (name, value) for name, value in self.compiler_flags.items()) )
|
||||||
params.update( dict( (name, value) for name, value in self.compiler_flags.items()) ) #override
|
|
||||||
d = {
|
d = {
|
||||||
'parameters' : params,
|
'parameters' : params,
|
||||||
'arch' : self.architecture,
|
'arch' : self.architecture,
|
||||||
|
@ -1646,6 +1644,7 @@ def _dup(self, other, **kwargs):
|
||||||
self.variants.spec = self
|
self.variants.spec = self
|
||||||
self.external = other.external
|
self.external = other.external
|
||||||
self.namespace = other.namespace
|
self.namespace = other.namespace
|
||||||
|
self.hash = other.hash
|
||||||
|
|
||||||
# If we copy dependencies, preserve DAG structure in the new spec
|
# If we copy dependencies, preserve DAG structure in the new spec
|
||||||
if kwargs.get('deps', True):
|
if kwargs.get('deps', True):
|
||||||
|
@ -1771,7 +1770,8 @@ def _cmp_node(self):
|
||||||
self.variants,
|
self.variants,
|
||||||
self.architecture,
|
self.architecture,
|
||||||
self.compiler,
|
self.compiler,
|
||||||
self.compiler_flags)
|
self.compiler_flags,
|
||||||
|
self.dag_hash())
|
||||||
|
|
||||||
|
|
||||||
def eq_node(self, other):
|
def eq_node(self, other):
|
||||||
|
@ -2126,8 +2126,6 @@ def spec(self, name, check_valid_token = False):
|
||||||
if spec_name != '':
|
if spec_name != '':
|
||||||
self.check_identifier(spec_name)
|
self.check_identifier(spec_name)
|
||||||
|
|
||||||
print spec_name, "++"
|
|
||||||
|
|
||||||
# This will init the spec without calling __init__.
|
# This will init the spec without calling __init__.
|
||||||
spec = Spec.__new__(Spec)
|
spec = Spec.__new__(Spec)
|
||||||
spec.name = spec_name
|
spec.name = spec_name
|
||||||
|
|
Loading…
Reference in a new issue