Constrain abstract specs rather than concatenating strings in the "when" context manager (#26700)
Using the Spec.constrain method doesn't work since it might trigger a repository lookup which could break our directives and triggers a circular import error. To fix that we introduce a function to merge abstract anonymous specs, based only on package names, which does not perform any lookup in the repository.
This commit is contained in:

committed by
GitHub

parent
2c3ea68dd1
commit
949094544e
@@ -17,4 +17,7 @@ class WithConstraintMet(Package):
|
||||
|
||||
with when('@1.0'):
|
||||
depends_on('b')
|
||||
conflicts('%gcc')
|
||||
conflicts('%gcc', when='+foo')
|
||||
|
||||
with when('@0.14: ^b@:4.0'):
|
||||
depends_on('c', when='@:15 ^b@3.8:')
|
||||
|
Reference in New Issue
Block a user