mirror of
https://git.yoctoproject.org/poky
synced 2026-09-24 22:36:21 +02:00
bitbake: user-manual-metadata.xml: Re-write of "Events" section.
General cleanup of the text. (Bitbake rev: 112dd4279826dc7587e1b8acb4a107374b5bd0fd) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c0239ff8a8
commit
233d644e5a
@@ -1340,19 +1340,21 @@
|
|||||||
<section id='events'>
|
<section id='events'>
|
||||||
<title>Events</title>
|
<title>Events</title>
|
||||||
|
|
||||||
<note>
|
|
||||||
This is only supported in <filename>.bb</filename>
|
|
||||||
and <filename>.bbclass</filename> files.
|
|
||||||
</note>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
BitBake allows installation of event handlers.
|
BitBake allows installation of event handlers within
|
||||||
|
recipe and class files.
|
||||||
Events are triggered at certain points during operation,
|
Events are triggered at certain points during operation,
|
||||||
such as the beginning of operation against a given
|
such as the beginning of operation against a given
|
||||||
<filename>.bb</filename>, the start of a given task,
|
<filename>.bb</filename>, the start of a given task,
|
||||||
task failure, task success, and so forth.
|
task failure, task success, and so forth.
|
||||||
The intent is to make it easy to do things like email
|
The intent is to make it easy to do things like email
|
||||||
notification on build failure.
|
notification on build failure.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following is an example event handler that
|
||||||
|
prints the name of the event and the content of
|
||||||
|
the <filename>FILE</filename> variable:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
addhandler myclass_eventhandler
|
addhandler myclass_eventhandler
|
||||||
python myclass_eventhandler() {
|
python myclass_eventhandler() {
|
||||||
@@ -1364,42 +1366,83 @@
|
|||||||
</literallayout>
|
</literallayout>
|
||||||
This event handler gets called every time an event is
|
This event handler gets called every time an event is
|
||||||
triggered.
|
triggered.
|
||||||
A global variable "<filename>e</filename>" is defined.
|
A global variable "<filename>e</filename>" is defined and
|
||||||
"<filename>e.data</filename>" contains an instance of
|
"<filename>e.data</filename>" contains an instance of
|
||||||
"<filename>bb.data</filename>".
|
"<filename>bb.data</filename>".
|
||||||
With the <filename>getName(e)</filename> method one can get
|
With the <filename>getName(e)</filename> method, one can get
|
||||||
the name of the triggered event.
|
the name of the triggered event.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The above event handler prints the name of the event
|
During all builds, the following common events occur:
|
||||||
and the content of the <filename>FILE</filename> variable.
|
|
||||||
During a Build, the following common events occur:
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename>bb.event.ConfigParsed()</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.ParseStarted()</filename></para></listitem>
|
<filename>bb.event.ConfigParsed()</filename>
|
||||||
<listitem><para><filename>bb.event.ParseProgress()</filename></para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><filename>bb.event.ParseCompleted()</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.BuildStarted()</filename></para></listitem>
|
<filename>bb.event.ParseStarted()</filename>
|
||||||
<listitem><para><filename>bb.build.TaskStarted()</filename></para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><filename>bb.build.TaskInvalid()</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.build.TaskFailedSilent()</filename></para></listitem>
|
<filename>bb.event.ParseProgress()</filename>
|
||||||
<listitem><para><filename>bb.build.TaskFailed()</filename></para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><filename>bb.build.TaskSucceeded()</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.BuildCompleted()</filename></para></listitem>
|
<filename>bb.event.ParseCompleted()</filename>
|
||||||
<listitem><para><filename>bb.cooker.CookerExit()</filename></para></listitem>
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.BuildStarted()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.build.TaskStarted()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.build.TaskInvalid()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.build.TaskFailedSilent()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.build.TaskFailed()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.build.TaskSucceeded()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.BuildCompleted()</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.cooker.CookerExit()</filename>
|
||||||
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
Other events that occur based on specific requests to the server:
|
Here is a list of other events that occur based on specific requests
|
||||||
|
to the server:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename>bb.event.TreeDataPreparationStarted()</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.TreeDataPreparationProgress</filename></para></listitem>
|
<filename>bb.event.TreeDataPreparationStarted()</filename>
|
||||||
<listitem><para><filename>bb.event.TreeDataPreparationCompleted</filename></para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><filename>bb.event.DepTreeGenerated</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.CoreBaseFilesFound</filename></para></listitem>
|
<filename>bb.event.TreeDataPreparationProgress</filename>
|
||||||
<listitem><para><filename>bb.event.ConfigFilePathFound</filename></para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><filename>bb.event.FilesMatchingFound</filename></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><filename>bb.event.ConfigFilesFound</filename></para></listitem>
|
<filename>bb.event.TreeDataPreparationCompleted</filename>
|
||||||
<listitem><para><filename>bb.event.TargetsTreeGenerated</filename></para></listitem>
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.DepTreeGenerated</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.CoreBaseFilesFound</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.ConfigFilePathFound</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.FilesMatchingFound</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.ConfigFilesFound</filename>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<filename>bb.event.TargetsTreeGenerated</filename>
|
||||||
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user