SV variants are evaluated correctly in "when=" (#4118)
* SV variants are evaluated correctly in `when=` statements fixes #4113 The problem here was tricky: ```python spec.satisfies(other) ``` changes already the MV variants in others into SV variants (where necessary) if spec is concrete. If it is not concrete it does nothing because we may be acting at a pure syntactical level. When evaluating a `when=` keyword spec is for sure not concrete as it is in the middle of the concretization process. In this case we have to trigger manually the substitution in other to not end up comparing a MV variant "foo=bar" to a SV variant "foo=bar" and having False in return. Which is wrong. * sv variants: improved error message for typos in "when=" statements
This commit is contained in:

committed by
Todd Gamblin

parent
6a9052bd4d
commit
85b4b15d9a
@@ -38,7 +38,15 @@ class Wget(Package):
|
||||
version('1.17', 'c4c4727766f24ac716936275014a0536')
|
||||
version('1.16', '293a37977c41b5522f781d3a3a078426')
|
||||
|
||||
depends_on("openssl")
|
||||
variant(
|
||||
'ssl',
|
||||
default='openssl',
|
||||
values=('gnutls', 'openssl'),
|
||||
description='Specify SSL backend'
|
||||
)
|
||||
|
||||
depends_on('gnutls', when='ssl=gnutls')
|
||||
depends_on('openssl', when='ssl=openssl')
|
||||
depends_on("perl@5.12.0:", type='build')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
Reference in New Issue
Block a user