From 233d644e5a752cf499f8b74d2e60785d4edd24cf Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 10 Feb 2014 08:11:58 -0600 Subject: bitbake: user-manual-metadata.xml: Re-write of "Events" section. General cleanup of the text. (Bitbake rev: 112dd4279826dc7587e1b8acb4a107374b5bd0fd) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- bitbake/doc/user-manual/user-manual-metadata.xml | 109 ++++++++++++++++------- 1 file changed, 76 insertions(+), 33 deletions(-) (limited to 'bitbake/doc') diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml index ab3dcb19e4..5d7a9d753c 100644 --- a/bitbake/doc/user-manual/user-manual-metadata.xml +++ b/bitbake/doc/user-manual/user-manual-metadata.xml @@ -1340,19 +1340,21 @@
Events - - This is only supported in .bb - and .bbclass files. - - - 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, such as the beginning of operation against a given .bb, 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. + + + + Following is an example event handler that + prints the name of the event and the content of + the FILE variable: addhandler myclass_eventhandler python myclass_eventhandler() { @@ -1364,42 +1366,83 @@ This event handler gets called every time an event is triggered. - A global variable "e" is defined. + A global variable "e" is defined and "e.data" contains an instance of "bb.data". - With the getName(e) method one can get + With the getName(e) method, one can get the name of the triggered event. - The above event handler prints the name of the event - and the content of the FILE variable. - During a Build, the following common events occur: + During all builds, the following common events occur: - bb.event.ConfigParsed() - bb.event.ParseStarted() - bb.event.ParseProgress() - bb.event.ParseCompleted() - bb.event.BuildStarted() - bb.build.TaskStarted() - bb.build.TaskInvalid() - bb.build.TaskFailedSilent() - bb.build.TaskFailed() - bb.build.TaskSucceeded() - bb.event.BuildCompleted() - bb.cooker.CookerExit() + + bb.event.ConfigParsed() + + + bb.event.ParseStarted() + + + bb.event.ParseProgress() + + + bb.event.ParseCompleted() + + + bb.event.BuildStarted() + + + bb.build.TaskStarted() + + + bb.build.TaskInvalid() + + + bb.build.TaskFailedSilent() + + + bb.build.TaskFailed() + + + bb.build.TaskSucceeded() + + + bb.event.BuildCompleted() + + + bb.cooker.CookerExit() + - 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: - bb.event.TreeDataPreparationStarted() - bb.event.TreeDataPreparationProgress - bb.event.TreeDataPreparationCompleted - bb.event.DepTreeGenerated - bb.event.CoreBaseFilesFound - bb.event.ConfigFilePathFound - bb.event.FilesMatchingFound - bb.event.ConfigFilesFound - bb.event.TargetsTreeGenerated + + bb.event.TreeDataPreparationStarted() + + + bb.event.TreeDataPreparationProgress + + + bb.event.TreeDataPreparationCompleted + + + bb.event.DepTreeGenerated + + + bb.event.CoreBaseFilesFound + + + bb.event.ConfigFilePathFound + + + bb.event.FilesMatchingFound + + + bb.event.ConfigFilesFound + + + bb.event.TargetsTreeGenerated +
-- cgit v1.2.3-54-g00ecf