diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-11-15 13:53:53 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-11-22 18:28:38 +0100 |
commit | 5b6e13653509b821a36b473bb3a399304fe571a9 (patch) | |
tree | 4978639a5d647fb52692a7c95fc041cd8c7edede | |
parent | 2d3758754337c673e459dfafe7db20462fa7acb2 (diff) |
coin: Don't prepend /bin: to PATH on Linux hosts
Coin tried to prepend {{.Env.PYTHON3_PATH}}/bin: to PATH on Linux and
macOS but there is no PYTHON3_PATH env var set in Linux's provisioning,
which accidentally ended up prepending /bin to PATH.
This causes issues in CMake where each directory in PATH is used as a
potential CMAKE_PREFIX_PATH value (with the /bin stripped), changing
the order of prefixes where packages are searched for.
In particular, when cross-compiling, this would lead to looking for
packages under the '/' prefix before the '/usr' prefix, which can cause
issues if /lib is a symlink to /usr/lib, because include paths won't be
resolved correctly anymore (different depth of directories).
Make sure to prepend {{.Env.PYTHON3_PATH}}/bin: to PATH only on macOS
and skip it on Linux hosts.
Amends 4af4b4c23551b68d4b207c47054af21ec64e76bd
Pick-to: 6.2
Task-number: PYSIDE-802
Change-Id: Ia8a59d501f95733376f8538ba599e963dfb88506
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r-- | coin/instructions/common_environment.yaml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index 9bca255e6..27fe4a27a 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -93,10 +93,10 @@ instructions: - type: PrependToEnvironmentVariable variableName: PATH variableValue: "{{.Env.PYTHON3_PATH}}/bin:" - disable_if: + enable_if: condition: property property: host.os - equals_value: Windows + equals_value: MacOS - type: PrependToEnvironmentVariable variableName: PATH variableValue: "{{.Env.PYTHON3_PATH}};" |