diff options
Diffstat (limited to 'bitbake/lib')
| -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 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 | ||
| 224 | def exec_func_shell(function, d, runfile, cwd=None): | 224 | def 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 | ||
| 264 | def _task_data(fn, task, d): | 264 | def _task_data(fn, task, d): |
| 265 | localdata = data.createCopy(d) | 265 | localdata = data.createCopy(d) |
