From df285693da68797ab604fed42da853ed0047849e Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Sun, 19 Feb 2017 10:41:56 +0900 Subject: [PATCH] bootstrap: stop trashing (DY)LD_LIBRARY_PATH This generated an ugly error with fakeroot before. --- src/bootstrap/bootstrap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 7ca7ef4bd72..58de5706e94 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -342,8 +342,12 @@ class RustBuild(object): env = os.environ.copy() env["CARGO_TARGET_DIR"] = build_dir env["RUSTC"] = self.rustc() - env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") - env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \ + (os.pathsep + env["LD_LIBRARY_PATH"]) \ + if "LD_LIBRARY_PATH" in env else "" + env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \ + (os.pathsep + env["DYLD_LIBRARY_PATH"]) \ + if "DYLD_LIBRARY_PATH" in env else "" env["PATH"] = os.path.join(self.bin_root(), "bin") + \ os.pathsep + env["PATH"] if not os.path.isfile(self.cargo()):