summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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 /bitbake/lib
parent78c2b79d549ca5be29c096beca87c4bf9cf8d6bb (diff)
downloadast2050-yocto-poky-043b70419ed8f37157a44491475bea548f92de2b.zip
ast2050-yocto-poky-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>
Diffstat (limited to 'bitbake/lib')
-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 a7664bd..2061522 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):
if logger.isEnabledFor(logging.DEBUG):
script.write("set -x\n")
data.emit_func(function, script, d)
-
+ if cwd:
+ script.write("cd %s" % cwd)
script.write("%s\n" % function)
os.fchmod(script.fileno(), 0775)
@@ -238,8 +239,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
logfile = sys.stdout
try:
- bb.process.run(cmd, env=env, cwd=cwd, shell=False, stdin=NULL,
- log=logfile)
+ bb.process.run(cmd, env=env, shell=False, stdin=NULL, log=logfile)
except bb.process.CmdError:
logfn = d.getVar('BB_LOGFILE', True)
raise FuncFailed(function, logfn)
OpenPOWER on IntegriCloud