[bitbake-devel] Research into exporting BitBake recipes for consumption elsewhere

Christopher Larson clarson at kergoth.com
Fri Aug 28 20:53:58 UTC 2015


On Fri, Aug 28, 2015 at 8:45 AM, Sam Thursfield <
sam.thursfield at codethink.co.uk> wrote:

> I wrote a proof-of-concept patch which lets you export all the tasks
> from a BitBake project, as actual executable shell and Python scripts.
> I'm sharing it here to see if anyone is interested in this sort of
> thing, and to see if anyone reading can point out obvious improvements
> that I haven't spotted.
>
> This is the first time I've hacked on BitBake's internals, so this code
> has quite a lot of room for improvement :-) Exporting is slow (~10
> mins), blocks the 'cooker' process completely while it runs, and causes
> BitBake to hang once it's finished. But, the generated scripts do
> actually work, which is what motived me to share the results.
>
> The goal of this is to have a tool for 'flattening' a set of recipes,
> which I think is useful when reasoning about what they actually do.
>
> Right now it produces almost 3GB of output for my test project. This is
> mostly because the entire data dict is dumped for each .py file. I've
> looked at deduplicating, but my naive implementation was incredibly slow
> (checking each variable in the dict for each task dump), and I've not
> thought of a more clever approach.
>
> Anyway, I hope this is interesting to someone; I may be able to spend
> some time turning it into a viable patch, if there is interest.
>

I find this very interesting, and will definitely be checking out the patch.

Regarding exporting full data dict, we maintain variable dependency
knowledge as a part of the metadata checksumming capability, so it should
be straightforward to only emit what's used for the task in question.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150828/0284fdb6/attachment-0002.html>


More information about the bitbake-devel mailing list