diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2014-08-15 09:01:49 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-09 22:25:27 +0000 |
commit | 1c7788f5c9b4f600063908fe93bfc4e5dfb3960f (patch) | |
tree | 2b4cd839b504f02c51a3003521243eedc9354d36 | |
parent | c2f68465dd97a8be0795384f971a3f8d05369416 (diff) | |
download | bitbake-1c7788f5c9b4f600063908fe93bfc4e5dfb3960f.tar.gz |
bitbake-user-manual-metadata.xml: Added [eventmask] flag information.
Reported-by: Laszlo Papp <lpapp@kde.org>
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 992f65058..26699fc26 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -1308,8 +1308,8 @@ BitBake allows installation of event handlers within recipe and class files. Events are triggered at certain points during operation, - such as the beginning of operation against a given - <filename>.bb</filename>, the start of a given task, + such as the beginning of an operation against a given recipe + (<filename>*.bb</filename> file), the start of a given task, task failure, task success, and so forth. The intent is to make it easy to do things like email notification on build failure. @@ -1338,6 +1338,27 @@ </para> <para> + Because you probably are only interested in a subset of events, + you would likely use the <filename>[eventmask]</filename> flag + for your event handler to be sure that only certain events + trigger the handler. + Given the previous example, suppose you only wanted the + <filename>bb.build.TaskFailed</filename> event to trigger that + event handler. + Use the flag as follows: + <literallayout class='monospaced'> + addhandler myclass_eventhandler + myclass_eventhandler[eventmask] = "bb.build.TaskFailed" + python myclass_eventhandler() { + from bb.event import getName + from bb import data + print("The name of the Event is %s" % getName(e)) + print("The file we run for is %s" % data.getVar('FILE', e.data, True)) + } + </literallayout> + </para> + + <para> During a standard build, the following common events might occur: <itemizedlist> <listitem><para> |