This commit is contained in:
parent
1a6c5ff541
commit
bff0291dac
@ -3009,8 +3009,9 @@ def satisfies_dependencies(self, other, strict=False):
|
||||
if not self._dependencies:
|
||||
return False
|
||||
|
||||
selfdeps = self.traverse(root=False)
|
||||
otherdeps = other.traverse(root=False)
|
||||
# use list to prevent double-iteration
|
||||
selfdeps = list(self.traverse(root=False))
|
||||
otherdeps = list(other.traverse(root=False))
|
||||
if not all(any(d.satisfies(dep, strict=True) for d in selfdeps)
|
||||
for dep in otherdeps):
|
||||
return False
|
||||
|
@ -1014,6 +1014,13 @@ def test_error_message_unknown_variant(self):
|
||||
with pytest.raises(UnknownVariantError, match=r'package has no such'):
|
||||
s.concretize()
|
||||
|
||||
@pytest.mark.regression('18527')
|
||||
def test_satisfies_dependencies_ordered(self):
|
||||
d = Spec('zmpi ^fake')
|
||||
s = Spec('mpileaks')
|
||||
s._add_dependency(d, ())
|
||||
assert s.satisfies('mpileaks ^zmpi ^fake', strict=True)
|
||||
|
||||
|
||||
@pytest.mark.regression('3887')
|
||||
@pytest.mark.parametrize('spec_str', [
|
||||
|
Loading…
Reference in New Issue
Block a user