aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-07-11 16:23:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:08:17 +0100
commitac02fda870965bf7d44ff5688eda54d2d11ab9c7 (patch)
tree908b73385237940f96a726eb49b4d8be58432c8b /lib/bb/cooker.py
parent4060776e408ec6baec3bafba79ac5db1bc380f01 (diff)
downloadbitbake-contrib-ac02fda870965bf7d44ff5688eda54d2d11ab9c7.tar.gz
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index a73a55de9..d4dd23f09 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1235,6 +1235,7 @@ class BBCooker:
"""
Build the file matching regexp buildfile
"""
+ bb.event.fire(bb.event.BuildInit(), self.expanded_data)
# Too many people use -b because they think it's how you normally
# specify a target to be built, so show a warning
@@ -1377,6 +1378,9 @@ class BBCooker:
if not task.startswith("do_"):
task = "do_%s" % task
+ packages = ["%s:%s" % (target, task) for target in targets]
+ bb.event.fire(bb.event.BuildInit(packages), self.expanded_data)
+
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
buildname = self.data.getVar("BUILDNAME", False)