summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/a/package.py
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-05-04 20:01:02 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-05-04 11:01:02 -0700
commit85b4b15d9a0d59b0a2a6e405ce7e4ddcc2ec71ba (patch)
tree4d0f2d68a2de0da255151f9b47ad906293f28626 /var/spack/repos/builtin.mock/packages/a/package.py
parent6a9052bd4dfb7526cc0ed5859ae8907d77d6e12a (diff)
downloadspack-85b4b15d9a0d59b0a2a6e405ce7e4ddcc2ec71ba.tar.gz
spack-85b4b15d9a0d59b0a2a6e405ce7e4ddcc2ec71ba.tar.bz2
spack-85b4b15d9a0d59b0a2a6e405ce7e4ddcc2ec71ba.tar.xz
spack-85b4b15d9a0d59b0a2a6e405ce7e4ddcc2ec71ba.zip
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
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/a/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/a/package.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py
index b697f4d2a9..e39ad13bd1 100644
--- a/var/spack/repos/builtin.mock/packages/a/package.py
+++ b/var/spack/repos/builtin.mock/packages/a/package.py
@@ -49,6 +49,8 @@ class A(AutotoolsPackage):
multi=False
)
+ depends_on('b', when='foobar=bar')
+
def with_or_without_fee(self, activated):
if not activated:
return '--no-fee'