diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-09-05 14:27:35 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-08 00:33:47 +0100 |
commit | ead05456264e9c7c32819271562d0ac074ecaee3 (patch) | |
tree | b018677d3dd040c53b66156fe7b29325c016bdd9 /bitbake | |
parent | b22a505414db060b5df0ce3d6c84c5dffd38463e (diff) | |
download | poky-ead05456264e9c7c32819271562d0ac074ecaee3.tar.gz |
bitbake: cooker: record events on cooker exit
Bitbake collects all events in special event queue when called with
-w option. However, it starts to write events to the eventlog only
after BuildStarted event is received. In some cases this event is
not received at all, e.g. when bitbake is run with --parse-only
command line option.
It makes sense to write all collected events when CookerExit event
received to make sure all events are written into the eventlog even
if BuildStarted event is not fired.
[YOCTO #10145]
(Bitbake rev: 57912de63fa83550c0ae658eb99b76e9cc91a8d1)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index b7d7a7ec21..0e78106d29 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -141,7 +141,7 @@ class EventWriter: | |||
141 | else: | 141 | else: |
142 | # init on bb.event.BuildStarted | 142 | # init on bb.event.BuildStarted |
143 | name = "%s.%s" % (event.__module__, event.__class__.__name__) | 143 | name = "%s.%s" % (event.__module__, event.__class__.__name__) |
144 | if name == "bb.event.BuildStarted": | 144 | if name in ("bb.event.BuildStarted", "bb.cooker.CookerExit"): |
145 | with open(self.eventfile, "w") as f: | 145 | with open(self.eventfile, "w") as f: |
146 | f.write("%s\n" % json.dumps({ "allvariables" : self.cooker.getAllKeysWithFlags(["doc", "func"])})) | 146 | f.write("%s\n" % json.dumps({ "allvariables" : self.cooker.getAllKeysWithFlags(["doc", "func"])})) |
147 | 147 | ||