Don't set LD_LIBRARY_PATH by default on Linux (#28354)
`LD_LIBRARY_PATH` can break system executables (e.g., when an enviornment is loaded) and isn't necessary thanks to `RPATH`s. Packages that require `LD_LIBRARY_PATH` can set this in `setup_run_environment`. - [x] Prefix inspections no longer set `LD_LIBRARY_PATH` by default - [x] Document changes and workarounds for people who want `LD_LIBRARY_PATH`
This commit is contained in:
@@ -32,12 +32,9 @@ def prefix_inspections(platform):
|
||||
|
||||
inspections = {
|
||||
"bin": ["PATH"],
|
||||
"lib": ["LD_LIBRARY_PATH", "LIBRARY_PATH"],
|
||||
"lib64": ["LD_LIBRARY_PATH", "LIBRARY_PATH"],
|
||||
"man": ["MANPATH"],
|
||||
"share/man": ["MANPATH"],
|
||||
"share/aclocal": ["ACLOCAL_PATH"],
|
||||
"include": ["CPATH"],
|
||||
"lib/pkgconfig": ["PKG_CONFIG_PATH"],
|
||||
"lib64/pkgconfig": ["PKG_CONFIG_PATH"],
|
||||
"share/pkgconfig": ["PKG_CONFIG_PATH"],
|
||||
@@ -45,8 +42,8 @@ def prefix_inspections(platform):
|
||||
}
|
||||
|
||||
if platform == "darwin":
|
||||
for subdir in ("lib", "lib64"):
|
||||
inspections[subdir].append("DYLD_FALLBACK_LIBRARY_PATH")
|
||||
inspections["lib"] = ["DYLD_FALLBACK_LIBRARY_PATH"]
|
||||
inspections["lib64"] = ["DYLD_FALLBACK_LIBRARY_PATH"]
|
||||
|
||||
return inspections
|
||||
|
||||
|
||||
Reference in New Issue
Block a user