[bitbake-devel] [PATCH 28/30] command: add CommandStarted event

Richard Purdie richard.purdie at linuxfoundation.org
Mon Dec 7 23:23:40 UTC 2015


On Mon, 2015-12-07 at 20:22 +0200, Ed Bartosh wrote:
> On Mon, Dec 07, 2015 at 05:36:57PM +0000, Richard Purdie wrote:
> > On Wed, 2015-12-02 at 10:03 -0800, brian avery wrote:
> > I'm not sure I like the idea of this, particularly after I've seen what
> > you're using it to do. Just from a performance standpoint, adding in an
> > event per command execution adds in round trips and will increase the
> > time something simple like "bitbake -p" takes to do nothing when the
> > cache is hot.
> >
> > I note in a later patch you use this to check for a command coming from
> > elsewhere to modify the data store and I worry that we'll end up with
> > unstructured code if we encourage people to do that too.
> >
> The reason of adding this event is that I wanted to introduce generic
> event that can be used by other people. Less generic ones would be 'VariableSet' or
> 'BRBESet'. I'm not sure those are better choice than CommandStarted.
> 
> > I did briefly talk to Brian and he mentioned you needed a way to
> > differentiate between events from different builds. I'd suggest you can
> > could do this if you markup the events as they come through your event
> > receiver, since events for a specific build should come through a
> > specific socket. Worst case I'd prefer doing this internally to bitbake
> > rather than the command interception above but adding data to every
> > event being sent over IPC is something I'd prefer to avoid if we can
> > too.
> >
> There were no suitable events for this purpose I'm afraid. All events I
> looked at were fired late than BRBE variable is set. I wanted to know
> when it's changed as soon as possible.
> 
> > Would you be able to see if there is a different way we could handle
> > this?
> I'll try to look again.

We did support custom event injection for toaster if I remember
correctly. Could the code that is setting this variable generate an
event that suited your needs?

Cheers,

Richard




More information about the bitbake-devel mailing list