Changed some variables to account for the fact that target is now a tuple
This commit is contained in:
parent
b9d09202c9
commit
3e1be63b0f
@ -566,7 +566,7 @@ def traverse(self, visited=None, d=0, **kwargs):
|
|||||||
in the traversal.
|
in the traversal.
|
||||||
|
|
||||||
root [=True]
|
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]
|
direction [=children|parents]
|
||||||
If 'children', does a traversal of this spec's children. If
|
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))
|
for d in sorted(self.dependencies))
|
||||||
}
|
}
|
||||||
if self.target:
|
if self.target:
|
||||||
d['target'] = self.target.to_dict()
|
d['target'] = self.target.target.to_dict()
|
||||||
else:
|
else:
|
||||||
d['target'] = None
|
d['target'] = None
|
||||||
if self.compiler:
|
if self.compiler:
|
||||||
@ -755,7 +755,6 @@ def _concretize_helper(self, presets=None, visited=None):
|
|||||||
|
|
||||||
if self.name in presets:
|
if self.name in presets:
|
||||||
changed |= self.constrain(presets[self.name])
|
changed |= self.constrain(presets[self.name])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Concretize virtual dependencies last. Because they're added
|
# Concretize virtual dependencies last. Because they're added
|
||||||
# to presets below, their constraints will all be merged, but we'll
|
# to presets below, their constraints will all be merged, but we'll
|
||||||
@ -830,6 +829,7 @@ def concretize(self):
|
|||||||
changed = True
|
changed = True
|
||||||
force = False
|
force = False
|
||||||
|
|
||||||
|
# Loops forever here in my implementation
|
||||||
while changed:
|
while changed:
|
||||||
changes = (self.normalize(force=force),
|
changes = (self.normalize(force=force),
|
||||||
self._expand_virtual_packages(),
|
self._expand_virtual_packages(),
|
||||||
@ -1279,7 +1279,7 @@ def satisfies(self, other, deps=True, strict=False):
|
|||||||
pkg = spack.db.get(self.name)
|
pkg = spack.db.get(self.name)
|
||||||
if pkg.provides(other.name):
|
if pkg.provides(other.name):
|
||||||
for provided, when_spec in pkg.provided.items():
|
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):
|
if provided.satisfies(other):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
@ -1306,9 +1306,9 @@ def satisfies(self, other, deps=True, strict=False):
|
|||||||
|
|
||||||
# Target satisfaction is currently just class equality.
|
# Target satisfaction is currently just class equality.
|
||||||
# If not strict, None means unconstrained.
|
# 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)
|
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)
|
other.add_target_from_string(other.target)
|
||||||
|
|
||||||
if self.target and other.target:
|
if self.target and other.target:
|
||||||
@ -1380,7 +1380,7 @@ def _dup(self, other, **kwargs):
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
dependencies[=True]
|
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.
|
spec but not its dependencies.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user