Bug 10145 - the -w writeeventlog should record all events from the beginning
Summary: the -w writeeventlog should record all events from the beginning
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-08-15 18:42 UTC by brian avery
Modified: 2016-09-09 06:43 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2016-08-15 18:42:16 UTC
The current code for -w event.log doesn't start recording the events until the event name == "bb.event.BuildStarted":
So, for example bitbake -p -w cow.log does not write out anything to cow.log, in fact the cow.log file is not created.

The current code does dump all the events in the Q and on the pending Q, so no events are lost.  Unfortunately, if there is no buildstarted event , we see nothing.

We do currently dump { "allvariables" : self.cooker.getAllKeysWithFlags(["doc", "func"])} on buildstarted but it seems like we could start from the beginning and dump the allvariables when and if we get to a buildstarted (or maybe a parsecompleted?).
Comment 1 Ed Bartosh 2016-09-05 11:36:02 UTC
I decided not to change current behaviour too much as there could be a reason to collect variables on BuildStarted event as variables can reflect real build environment better if they're collected when build is started.

To make sure we always record events it's better to record them also when CookerExit event is received. This way bitbake -p -w eventlog with output events to the log even if BuildStarted is not received, but it will output them starting from BuildStarted if it's received.

Please, review: http://lists.openembedded.org/pipermail/bitbake-devel/2016-September/007982.html