[oe-commits] [bitbake] 18/18: cooker: record events on cooker exit

git at git.openembedded.org git at git.openembedded.org
Tue Sep 6 09:37:53 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 57912de63fa83550c0ae658eb99b76e9cc91a8d1
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Mon Sep 5 14:27:35 2016 +0300

    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]
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index b7d7a7e..0e78106 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -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"])}))
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list