Skip to content

Commit df28569

Browse files
committed
bootstrap: stop trashing (DY)LD_LIBRARY_PATH
This generated an ugly error with fakeroot before.
1 parent 306035c commit df28569

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bootstrap/bootstrap.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,12 @@ def build_bootstrap(self):
342342
env = os.environ.copy()
343343
env["CARGO_TARGET_DIR"] = build_dir
344344
env["RUSTC"] = self.rustc()
345-
env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib")
346-
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib")
345+
env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
346+
(os.pathsep + env["LD_LIBRARY_PATH"]) \
347+
if "LD_LIBRARY_PATH" in env else ""
348+
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
349+
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
350+
if "DYLD_LIBRARY_PATH" in env else ""
347351
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
348352
os.pathsep + env["PATH"]
349353
if not os.path.isfile(self.cargo()):

0 commit comments

Comments
 (0)