]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build: switch to old cwd handling
authorChris Larson <chris_larson@mentor.com>
Fri, 25 Feb 2011 22:36:15 +0000 (15:36 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 25 Feb 2011 22:36:45 +0000 (15:36 -0700)
We want this to ensure the user can run the run. script from anywhere.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/build.py

index 4d8a2688cdb5c988ab6143e7b04e27151caeb917..aae77e14035c099e6e44d73f88e06740ac3b8dfd 100644 (file)
@@ -216,6 +216,8 @@ def exec_func_shell(function, d, runfile, cwd=None, fakeroot=False):
         data.emit_func(function, script, d)
 
         script.write("set -x\n")
+        if cwd:
+            script.write("cd %s" % cwd)
         script.write("%s\n" % function)
         os.fchmod(script.fileno(), 0775)
 
@@ -230,7 +232,7 @@ def exec_func_shell(function, d, runfile, cwd=None, fakeroot=False):
         logfile = sys.stdout
 
     try:
-        bb.process.run(cmd, cwd=cwd, shell=False, stdin=NULL, log=logfile)
+        bb.process.run(cmd, shell=False, stdin=NULL, log=logfile)
     except bb.process.CmdError:
         logfn = d.getVar('BB_LOGFILE', True)
         raise FuncFailed(function, logfn)