Changed some variables to account for the fact that target is now a tuple

This commit is contained in:
Mario Melara 2016-02-11 11:15:50 -08:00
parent b9d09202c9
commit 3e1be63b0f

View File

@ -566,7 +566,7 @@ def traverse(self, visited=None, d=0, **kwargs):
in the traversal.
root [=True]
If false, this won't yield the root node, just its descendents.
If False, this won't yield the root node, just its descendents.
direction [=children|parents]
If 'children', does a traversal of this spec's children. If
@ -661,7 +661,7 @@ def to_node_dict(self):
for d in sorted(self.dependencies))
}
if self.target:
d['target'] = self.target.to_dict()
d['target'] = self.target.target.to_dict()
else:
d['target'] = None
if self.compiler:
@ -755,7 +755,6 @@ def _concretize_helper(self, presets=None, visited=None):
if self.name in presets:
changed |= self.constrain(presets[self.name])
else:
# Concretize virtual dependencies last. Because they're added
# to presets below, their constraints will all be merged, but we'll
@ -830,6 +829,7 @@ def concretize(self):
changed = True
force = False
# Loops forever here in my implementation
while changed:
changes = (self.normalize(force=force),
self._expand_virtual_packages(),
@ -1279,7 +1279,7 @@ def satisfies(self, other, deps=True, strict=False):
pkg = spack.db.get(self.name)
if pkg.provides(other.name):
for provided, when_spec in pkg.provided.items():
if self.satisfies(when_spec, deps=false, strict=strict):
if self.satisfies(when_spec, deps=False, strict=strict):
if provided.satisfies(other):
return True
return False
@ -1306,9 +1306,9 @@ def satisfies(self, other, deps=True, strict=False):
# Target satisfaction is currently just class equality.
# If not strict, None means unconstrained.
if not isinstance(self.target, spack.architecture.Target):
if isinstance(self.target, basestring):
self.add_target_from_string(self.target)
if not isinstance(other.target, spack.architecture.Target):
if isinstance(other.target, basestring):
other.add_target_from_string(other.target)
if self.target and other.target:
@ -1380,7 +1380,7 @@ def _dup(self, other, **kwargs):
Options:
dependencies[=True]
Whether deps should be copied too. Set to false to copy a
Whether deps should be copied too. Set to False to copy a
spec but not its dependencies.
"""