]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Write out siginfo files for non-sstate tasks
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Dec 2013 13:49:23 +0000 (13:49 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Dec 2013 17:06:57 +0000 (17:06 +0000)
Currently siginfo files are only written for sstate tasks. In order to be truly
debuggable, its helpful to have the siginfo for intermediate tasks. This
adds that functionality so the extra siginfo files are written out too.

This will be used to add better sstate debugging in future changes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 517c1001d29d2b0f6c868fd2df431a1782f12fd8..678d5e3f447069f623f60954489cf26a4d330606 100644 (file)
@@ -735,3 +735,14 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
         return False
     return True
 
+addhandler sstate_eventhandler
+sstate_eventhandler[eventmask] = "bb.build.TaskSucceeded"
+python sstate_eventhandler() {
+    d = e.data
+    # When we write an sstate package we rewrite the SSTATE_PKG
+    spkg = d.getVar('SSTATE_PKG', True)
+    if not spkg.endswith(".tgz"):
+        taskname = d.getVar("BB_RUNTASK", True)[3:]
+        bb.siggen.dump_this_task(d.getVar('SSTATE_PKG', True) + '_' + taskname + ".tgz" ".siginfo", d)
+}
+