diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-02-25 15:36:15 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-03-03 16:33:57 -0800 |
commit | 5a0f713935e83198080bfcc71c5b05a8db701e39 (patch) | |
tree | 230e04a89775073763fe7c1d9fe37f8eae7b44de /bitbake | |
parent | 34921ffbbac95d56a441f6af976fdb70ef9577db (diff) | |
download | poky-5a0f713935e83198080bfcc71c5b05a8db701e39.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')
-rw-r--r-- | bitbake/lib/bb/build.py | 6 |
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) |