[OE-core] [PATCH 2/4] terminal.bbclass: Fix BB_RUNFMT processing

Mark Hatle mark.hatle at windriver.com
Mon Jul 15 20:10:27 UTC 2013


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 at windriver.com>
---
 meta/classes/terminal.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index ae338e9..591b4ac 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -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)
-- 
1.8.3




More information about the Openembedded-core mailing list