]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: cooker: record events on cooker exit
authorEd Bartosh <ed.bartosh@linux.intel.com>
Mon, 5 Sep 2016 11:27:35 +0000 (14:27 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2016 23:33:47 +0000 (00:33 +0100)
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>
bitbake/lib/bb/cooker.py

index b7d7a7ec216ac24809747a1f2c1735d5662264b1..0e78106d2911863d92df43aae11640826caf8afc 100644 (file)
@@ -141,7 +141,7 @@ class EventWriter:
         else:
             # init on bb.event.BuildStarted
             name = "%s.%s" % (event.__module__, event.__class__.__name__)
-            if name == "bb.event.BuildStarted":
+            if name in ("bb.event.BuildStarted", "bb.cooker.CookerExit"):
                 with open(self.eventfile, "w") as f:
                     f.write("%s\n" % json.dumps({ "allvariables" : self.cooker.getAllKeysWithFlags(["doc", "func"])}))