diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-23 10:45:10 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-23 18:15:23 +0100 |
commit | d0de551d44e6d88a4d46bea4e9593a7201a1659e (patch) | |
tree | 64f989a870215625c247754e6d54086baae6bb9f | |
parent | c9e38aed29bf072d83079867c37f3169a7005fce (diff) | |
download | ast2050-yocto-poky-d0de551d44e6d88a4d46bea4e9593a7201a1659e.zip ast2050-yocto-poky-d0de551d44e6d88a4d46bea4e9593a7201a1659e.tar.gz |
build.py: Cleanup exec_func_shell
exec_func_python and exec_func_shell are similar, but variable
usage has diverged sync the two up. Since exec_func_python is first
use that as the guide for the later exec_func_shell variable naming.
(Bitbake rev: ccfe1a3a2419172799957676107f240badf3f062)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/build.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 4f06b15..9f2c6a7 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -221,7 +221,7 @@ def exec_func_python(func, d, runfile, cwd=None): except OSError: pass -def exec_func_shell(function, d, runfile, cwd=None): +def exec_func_shell(func, d, runfile, cwd=None): """Execute a shell function from the metadata Note on directory behavior. The 'dirs' varflag should contain a list @@ -234,18 +234,18 @@ def exec_func_shell(function, d, runfile, cwd=None): with open(runfile, 'w') as script: script.write('#!/bin/sh -e\n') - data.emit_func(function, script, d) + data.emit_func(func, script, d) if bb.msg.loggerVerboseLogs: script.write("set -x\n") if cwd: script.write("cd %s\n" % cwd) - script.write("%s\n" % function) + script.write("%s\n" % func) os.chmod(runfile, 0775) cmd = runfile - if d.getVarFlag(function, 'fakeroot'): + if d.getVarFlag(func, 'fakeroot'): fakerootcmd = d.getVar('FAKEROOT', True) if fakerootcmd: cmd = [fakerootcmd, runfile] @@ -259,7 +259,7 @@ def exec_func_shell(function, d, runfile, cwd=None): bb.process.run(cmd, shell=False, stdin=NULL, log=logfile) except bb.process.CmdError: logfn = d.getVar('BB_LOGFILE', True) - raise FuncFailed(function, logfn) + raise FuncFailed(func, logfn) def _task_data(fn, task, d): localdata = data.createCopy(d) |