[bitbake-devel] RFC: Override expansion - changing the behaviour

Chris Larson clarson at kergoth.com
Wed Jun 1 15:51:34 UTC 2011


On Wed, Jun 1, 2011 at 7:59 AM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> To follow up on this, what kind of cleanup would this and some other
> tweaks to bitbake allow?
>
> This is my proof of concept:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/temp3&id=1ed909e8b9bac6ed88ffbbe6a100a42c4289f498
>
> which cleans up native.bbclass and nativesdk.bbclass to be much cleaner
> code with less strange side effects and hoops to jump through.
>
> The main changes to bitbake after the original patch I posted were:
>
> a) Add handlers before any data finalisation
> b) Add a new "pre finalise" event
>

This looks quite sane in general. The "if len(override) > 0" isn't
pythonic, however. That should be "if override:". Of course,
_seen_overrides would be better as a defaultdict(set), but that's
minor. I'd also have taken the time to fix the formatting of
"self._seen_overrides[override].add( var )". Those spaces around the
argument aren't consistent with the code style of the rest of bitbake.
Regarding the metadata comparison, there's emit_data.bbclass in OE
which does essentially the same thing, dumps and compares. I support
the overrides change going into bitbake, as long as we can ensure it
breaks neither oe-core/poky or upstream OE.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the bitbake-devel mailing list