summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-08-15 09:01:49 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-09 22:25:40 +0000
commit2310ca25eda2b0e36dfd29491915d62229f362a7 (patch)
tree064c593f83e00b69f93850688d4dfd45b14b3abf /bitbake
parent0185dcd883d93d36200f29f9eeb88181d41e50b3 (diff)
downloadpoky-2310ca25eda2b0e36dfd29491915d62229f362a7.tar.gz
bitbake: bitbake-user-manual-metadata.xml: Added [eventmask] flag information.
Reported-by: Laszlo Papp <lpapp@kde.org> (Bitbake rev: 1c7788f5c9b4f600063908fe93bfc4e5dfb3960f) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml25
1 files changed, 23 insertions, 2 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 992f65058f..26699fc268 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -1308,8 +1308,8 @@
1308 BitBake allows installation of event handlers within 1308 BitBake allows installation of event handlers within
1309 recipe and class files. 1309 recipe and class files.
1310 Events are triggered at certain points during operation, 1310 Events are triggered at certain points during operation,
1311 such as the beginning of operation against a given 1311 such as the beginning of an operation against a given recipe
1312 <filename>.bb</filename>, the start of a given task, 1312 (<filename>*.bb</filename> file), the start of a given task,
1313 task failure, task success, and so forth. 1313 task failure, task success, and so forth.
1314 The intent is to make it easy to do things like email 1314 The intent is to make it easy to do things like email
1315 notification on build failure. 1315 notification on build failure.
@@ -1338,6 +1338,27 @@
1338 </para> 1338 </para>
1339 1339
1340 <para> 1340 <para>
1341 Because you probably are only interested in a subset of events,
1342 you would likely use the <filename>[eventmask]</filename> flag
1343 for your event handler to be sure that only certain events
1344 trigger the handler.
1345 Given the previous example, suppose you only wanted the
1346 <filename>bb.build.TaskFailed</filename> event to trigger that
1347 event handler.
1348 Use the flag as follows:
1349 <literallayout class='monospaced'>
1350 addhandler myclass_eventhandler
1351 myclass_eventhandler[eventmask] = "bb.build.TaskFailed"
1352 python myclass_eventhandler() {
1353 from bb.event import getName
1354 from bb import data
1355 print("The name of the Event is %s" % getName(e))
1356 print("The file we run for is %s" % data.getVar('FILE', e.data, True))
1357 }
1358 </literallayout>
1359 </para>
1360
1361 <para>
1341 During a standard build, the following common events might occur: 1362 During a standard build, the following common events might occur:
1342 <itemizedlist> 1363 <itemizedlist>
1343 <listitem><para> 1364 <listitem><para>