Skip to content

[bug] Equals sign (=) in profile (package) pattern broken #19335

@stevenwdv

Description

@stevenwdv

Describe the bug

An equals sign (=) in a profile (package) pattern causes issues, because conan splits the key and value in the wrong place:

for op, method in ConfDefinition.actions:
tokens = line.split(op, 1)

How to reproduce it

Given this profile:

[conf]
qt/[>=6.9]:tools.cmake.cmaketoolchain:extra_variables={'QT_NO_APPLE_SDK_AND_XCODE_CHECK': 'ON'}

Conan fails with the following error:

ERROR: Error reading './conan_profile' profile: [conf] 'qt/[>' not allowed in profiles

Conan splits the line as:
qt/[> = 6.9]:tools.cmake.cmaketoolchain:extra_variables={'QT_NO_APPLE_SDK_AND_XCODE_CHECK': 'ON'}

instead of
qt/[>=6.9]:tools.cmake.cmaketoolchain:extra_variables = {'QT_NO_APPLE_SDK_AND_XCODE_CHECK': 'ON'}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions