@@ -263,7 +263,7 @@ class OEliteUri:
finally:
if cwd:
os.chdir(cwd)
- rc = oe.process.run(cmd)
+ rc = oe.process.run(cmd, None, env = {"PWD": d.get("PWD"), "PATH" : d.get("PATH")})
return rc == 0
def srcpath(self, d):
@@ -286,8 +286,8 @@ class OEliteUri:
with open("%s/series"%(d.get("PATCHDIR")), "a") as series:
series.write("%s -p%s\n"%(
self.patchpath(d), self.params["striplevel"]))
-
- rc = oe.process.run("quilt -v --quiltrc %s push"%(d.get("QUILTRC")))
+
+ rc = oe.process.run("quilt -v --quiltrc %s push"%(d.get("QUILTRC")), None, env = {"PWD": d.get("PWD"), "PATH" : d.get("PATH")})
if rc != 0:
# FIXME: proper error handling
raise Exception("quilt push failed: %d"%(rc))
@@ -306,7 +306,7 @@ def patch_init(d):
os.chdir(s)
if os.path.exists(".pc"):
while os.path.exists(".pc/applied-patches"):
- rc = oe.process.run("quilt -v --quiltrc %s pop"%(quiltrc))
+ rc = oe.process.run("quilt -v --quiltrc %s pop"%(quiltrc), None, env = {"PATH" : d.get("PATH")})
if rc != 0:
# FIXME: proper error handling
raise Exception("quilt pop failed")
@@ -172,12 +172,15 @@ class ShellFunction(OEliteFunction):
runfile.write("set -x\n")
ld_library_path = self.meta.get("LD_LIBRARY_PATH")
flags = self.meta.get_flags("LD_LIBRARY_PATH")
+ ld_library_path_var = "LD_LIBRARY_PATH"
+ if self.meta.get("BUILD_OS") == "darwin":
+ ld_library_path_var = "DYLD_LIBRARY_PATH"
if self.ld_library_path:
# Prepend already existing content of LD_LIBRARY_PATH only if its set
- runfile.write("if [ $LD_LIBRARY_PATH ]; then \
- export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:" + self.ld_library_path + "\" ;\
+ runfile.write("if [ $" + ld_library_path_var + " ]; then \
+ export " + ld_library_path_var + "=\"$" + ld_library_path_var + ":" + self.ld_library_path + "\" ;\
else \
- export LD_LIBRARY_PATH=\"" + self.ld_library_path + "\" ;\
+ export " + ld_library_path_var + "=\"" + self.ld_library_path + "\" ;\
fi\n")
runfile.write("cd %s\n"%(os.getcwd()))
runfile.write("%s\n"%(self.name))
@@ -187,5 +190,5 @@ class ShellFunction(OEliteFunction):
if self.meta.get_flag(self.name, "fakeroot"):
cmd = "%s "%(self.meta.get("FAKEROOT") or "fakeroot") + cmd
cmd = "LC_ALL=C " + cmd
- rc = oe.process.run(cmd)
+ rc = oe.process.run(cmd, None, env = {"PWD": self.meta.get("PWD"), "PATH" : self.meta.get("PATH")})
return rc == 0
From: Yann Diorcet <yann.diorcet@belledonne-communications.com> Force few env variables. On darwin the commands fail if this variables are not set --- lib/oelite/fetch/fetch.py | 8 ++++---- lib/oelite/function.py | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-)