From 043b70419ed8f37157a44491475bea548f92de2b Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 25 Feb 2011 15:36:15 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/build.py') 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): 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) -- cgit v1.2.3-54-g00ecf