[oe] bitbake 'events' - How to fix the current problems?

Richard Purdie rpurdie at rpsys.net
Mon Jan 18 22:09:00 UTC 2010


Hi,

I've been looking at ways of trying to handle events sanely within
bitbake. There are several problems, some of which I've heard others
talk about:

1. The getName() function call 

This just looks horrid, we can come up with better semantics.

2. Text string comparisons in the event handlers (name.startswith('x'))

I don't really object to this as such, I think having text strings
representing the event makes sense. I did see someone disliking it
though. Now is an opportunity to point me at a better way of doing this,
I can't find one.

3. Inclusion of the data dictionary within every event

This messes up the bitbake client/server code no end since if you want
to pickle or otherwise transport the event via IPC, it has the whole
data dictionary in it. We need the event objects to be marshallable
ideally.

4. The pointless return values

These should just die, they're useless.


As always, its pointless to complain about something without a plan to
fix it. I therefore propose we add a new style of event handlers which
take a new form of event. These event handlers are functions called with
three parameters - an event name as a text string, event data and the
data dict separately. There is no return value.

The events themselves would be made marshallable.

Any objections or better suggestions?

Also, anything else we need to fix about the events whilst we're
changing things?

Cheers,

Richard








More information about the Openembedded-devel mailing list