terminal.bbclass: Fix BB_RUNFMT processing
BB_RUNFMT can include task and taskfunc, as well as func and pid. Add the two missing items toe the runfmt processing. Also BB_RUNFMT can include arbitrary directory structure. (From OE-Core rev: 95f6e9a3d8fa24acc3bab392719e2d92be25d806) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4a6f939b4d
commit
3cef1294f2
|
@ -18,8 +18,10 @@ def emit_terminal_func(command, envdata, d):
|
|||
envdata.setVarFlag(cmd_func, 'func', 1)
|
||||
|
||||
runfmt = d.getVar('BB_RUNFMT', True) or "run.{func}.{pid}"
|
||||
runfile = runfmt.format(func=cmd_func, pid=os.getpid())
|
||||
runfile = runfmt.format(func=cmd_func, task=cmd_func, taskfunc=cmd_func, pid=os.getpid())
|
||||
runfile = os.path.join(d.getVar('T', True), runfile)
|
||||
bb.mkdirhier(os.path.dirname(runfile))
|
||||
|
||||
with open(runfile, 'w') as script:
|
||||
script.write('#!/bin/sh -e\n')
|
||||
bb.data.emit_func(cmd_func, script, envdata)
|
||||
|
|
Loading…
Reference in New Issue