From c471740f5ba023dccc992438c75f1534950d26af Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Mon, 11 Jul 2016 16:23:05 +0100 Subject: bitbake: cooker: add BuildInit event In situations where a bitbake run fails before the build properly starts and BuildStarted is fired, a UI has no way to get at the targets passed to the build. This makes it difficult for the UI to report on the targets which failed. Fire a BuildInit event before running buildTargets() or buildFile(). This enables a UI to capture targets passed to buildTargets(), even if the build fails (e.g. the targets themselves are invalid). [YOCTO #8440] (Bitbake rev: ac02fda870965bf7d44ff5688eda54d2d11ab9c7) Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/bb/event.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/event.py') diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index a5f026e151..1f3200e196 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -382,7 +382,11 @@ class BuildBase(Event): - +class BuildInit(BuildBase): + """buildFile or buildTargets was invoked""" + def __init__(self, p=[]): + name = None + BuildBase.__init__(self, name, p) class BuildStarted(BuildBase, OperationStarted): """bbmake build run started""" -- cgit 1.2.3-korg