]> code.ossystems Code Review - openembedded-core.git/commitdiff
terminal.bbclass: Fix BB_RUNFMT processing
authorMark Hatle <mark.hatle@windriver.com>
Mon, 15 Jul 2013 20:10:27 +0000 (15:10 -0500)
committerSaul Wold <sgw@linux.intel.com>
Thu, 18 Jul 2013 14:14:40 +0000 (07:14 -0700)
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.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/terminal.bbclass

index ae338e9f57fb3252e97fca66349bc0ccf9bdffcc..591b4acf6d6ed47fc963799049fe2f3adab1eb37 100644 (file)
@@ -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)