Skip to content

Spec parsing broken for key=value pairs #13752

@obreitwi

Description

@obreitwi

If a spec contains more than one key=value pair or the key=value pair is not at the end of the spec, parsing breaks:

$ spack spec "py-matplotlib backend=agg target=x86_64 +image ^python@3.7.5"
Input spec
--------------------------------
py-matplotlib backend=agg target=x86_64 +image ^python@3.7.5

Concretized
--------------------------------
==> Error: invalid values for variant "backend" in package "py-matplotlib": ['agg target=x86_64 +image ^python@3.7.5']

This is due to the fact that the regexp for matching the value part only checks for a non-whitespace character at the start and then matches everything (one-line PR incoming).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions