diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-11-15 13:53:53 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-22 18:54:31 +0000 |
commit | e2c4910c3281d2739b0897c8cb99d9be8bcb29d4 (patch) | |
tree | 99683be9c6496a3b0351d9520bce4daaacc685e3 | |
parent | 06d12ff91f30b97d23f5c57ff76962ce068ae96c (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
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>
(cherry picked from commit 5b6e13653509b821a36b473bb3a399304fe571a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_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}};" |