[oe] Information from a bitbake parse

Paul Eggleton paul.eggleton at linux.intel.com
Mon Apr 22 17:22:37 UTC 2013


On Monday 22 April 2013 18:15:32 Paul Eggleton wrote:
> On Thursday 18 April 2013 12:39:21 Frederick Stakem -X wrote:
> > I have been poking through the bitbake python code and can't seem to
> > figure
> > out this problem. I want to parse all of the bitbake files for a build and
> > have this information exported into a text format. In short I want the
> > information in the recipes condensed into an easier to parse format so
> > that
> > I can use it in my own software. Does anyone know how to do this or where
> > in the code I can gain access to this information. I have put a decent
> > amount of debug code in the bitbake cooker but have come up empty so far.
> 
> So, you might like to look at the update script I wrote for the layer index:
> 
> https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/up
> date.py
> 
> Because I needed it to ignore parsing errors it does parse one file at a
> time (doing the internal equivalent of a bitbake -e) rather than relying on
> the cache, something I hope to re-engineer in future. I'm not sure if how
> it does things will exactly fit what you're trying to do but it should
> allow you to extract information from each recipe if that's all you need.

Sorry, it would help if I mentioned a couple of things about the script 
specifically:

* This script uses the "tinfoil" wrapper around BitBake that is useful for 
creating small BitBake-based utilities such as this one.

* The update_recipe_file() function is where you need to look for the actual 
code that reads the information from each recipe.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre




More information about the Openembedded-devel mailing list