setup.sh: Only load XDG_DATA_DIRS for executable inputs

This avoids the scenario where strictDeps is off and cross-compiled
XDG_DATA_DIRS content is brought into the environment.

While probably harmless for data like manpages and completion scripts,
this would cause issues when XDG_DATA_DIRS is used to find executables
or plugins. The Qt framework is known to behave like this and might
have run into incompatibilities.
This commit is contained in:
Robert Hensing 2020-11-13 01:12:37 +01:00 committed by Jonathan Ringer
parent 0f13cccb95
commit 84c58abdc4

View file

@ -485,6 +485,9 @@ activatePackage() {
# TODO(@Ericson2314): Don't special-case native compilation
if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
addToSearchPath _PATH "$pkg/bin"
fi
if [[ "$hostOffset" -le -1 ]]; then
addToSearchPath _XDG_DATA_DIRS "$pkg/share"
fi