summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-02-25 15:36:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-03 22:48:39 +0000
commit043b70419ed8f37157a44491475bea548f92de2b (patch)
tree8354b42e3ef6c629db7965d87a617faa58496252
parent78c2b79d549ca5be29c096beca87c4bf9cf8d6bb (diff)
downloadpoky-043b70419ed8f37157a44491475bea548f92de2b.tar.gz
build: switch to old cwd handling
We want this to ensure the user can run the run. script from anywhere. (Bitbake rev: a600b79ecefc95eeb266c3f362c7160fa8c948c1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index a7664bd36d..2061522bf6 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -221,7 +221,8 @@ def exec_func_shell(function, d, runfile, cwd=None):
221 if logger.isEnabledFor(logging.DEBUG): 221 if logger.isEnabledFor(logging.DEBUG):
222 script.write("set -x\n") 222 script.write("set -x\n")
223 data.emit_func(function, script, d) 223 data.emit_func(function, script, d)
224 224 if cwd:
225 script.write("cd %s" % cwd)
225 script.write("%s\n" % function) 226 script.write("%s\n" % function)
226 os.fchmod(script.fileno(), 0775) 227 os.fchmod(script.fileno(), 0775)
227 228
@@ -238,8 +239,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
238 logfile = sys.stdout 239 logfile = sys.stdout
239 240
240 try: 241 try:
241 bb.process.run(cmd, env=env, cwd=cwd, shell=False, stdin=NULL, 242 bb.process.run(cmd, env=env, shell=False, stdin=NULL, log=logfile)
242 log=logfile)
243 except bb.process.CmdError: 243 except bb.process.CmdError:
244 logfn = d.getVar('BB_LOGFILE', True) 244 logfn = d.getVar('BB_LOGFILE', True)
245 raise FuncFailed(function, logfn) 245 raise FuncFailed(function, logfn)