summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-23 10:45:10 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-23 18:15:23 +0100
commitd0de551d44e6d88a4d46bea4e9593a7201a1659e (patch)
tree64f989a870215625c247754e6d54086baae6bb9f /bitbake/lib
parentc9e38aed29bf072d83079867c37f3169a7005fce (diff)
downloadpoky-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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/build.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 4f06b15943..9f2c6a7d23 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):
221 except OSError: 221 except OSError:
222 pass 222 pass
223 223
224def exec_func_shell(function, d, runfile, cwd=None): 224def exec_func_shell(func, d, runfile, cwd=None):
225 """Execute a shell function from the metadata 225 """Execute a shell function from the metadata
226 226
227 Note on directory behavior. The 'dirs' varflag should contain a list 227 Note on directory behavior. The 'dirs' varflag should contain a list
@@ -234,18 +234,18 @@ def exec_func_shell(function, d, runfile, cwd=None):
234 234
235 with open(runfile, 'w') as script: 235 with open(runfile, 'w') as script:
236 script.write('#!/bin/sh -e\n') 236 script.write('#!/bin/sh -e\n')
237 data.emit_func(function, script, d) 237 data.emit_func(func, script, d)
238 238
239 if bb.msg.loggerVerboseLogs: 239 if bb.msg.loggerVerboseLogs:
240 script.write("set -x\n") 240 script.write("set -x\n")
241 if cwd: 241 if cwd:
242 script.write("cd %s\n" % cwd) 242 script.write("cd %s\n" % cwd)
243 script.write("%s\n" % function) 243 script.write("%s\n" % func)
244 244
245 os.chmod(runfile, 0775) 245 os.chmod(runfile, 0775)
246 246
247 cmd = runfile 247 cmd = runfile
248 if d.getVarFlag(function, 'fakeroot'): 248 if d.getVarFlag(func, 'fakeroot'):
249 fakerootcmd = d.getVar('FAKEROOT', True) 249 fakerootcmd = d.getVar('FAKEROOT', True)
250 if fakerootcmd: 250 if fakerootcmd:
251 cmd = [fakerootcmd, runfile] 251 cmd = [fakerootcmd, runfile]
@@ -259,7 +259,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
259 bb.process.run(cmd, shell=False, stdin=NULL, log=logfile) 259 bb.process.run(cmd, shell=False, stdin=NULL, log=logfile)
260 except bb.process.CmdError: 260 except bb.process.CmdError:
261 logfn = d.getVar('BB_LOGFILE', True) 261 logfn = d.getVar('BB_LOGFILE', True)
262 raise FuncFailed(function, logfn) 262 raise FuncFailed(func, logfn)
263 263
264def _task_data(fn, task, d): 264def _task_data(fn, task, d):
265 localdata = data.createCopy(d) 265 localdata = data.createCopy(d)