On Friday 02 August 2013 17:14:34 Hongxu Jia wrote: > On 08/02/2013 04:24 PM, Paul Eggleton wrote: > > So, this is fairly simple and works for most cases; however it would > > probably be a bit more robust if the script used bitbake's own parser to > > extract the flags. The "tinfoil" module should help with this. We can > > always address this in a follow-up patch later on, though - I can > > certainly show you some examples of how to do this or I can do it, > > whichever you prefer. > > Great, this is what I hope to do in the follow-up, I am very pleased to > do the investigate on bitbake parser, very thankful to share some > examples of how to do this with me.
Sure - we use the parser in the layer index. The latest in-development code has a module that does most of the work: http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/tree/layerindex/recipeparse.py?h=paule/features Specifically, you can call bb.cache.Cache.loadDataFull() for each recipe file and that will give you a datastore you can query for information. I'm not sure, but you may wish to use bitbake's cache to get the list of recipes rather than just walking the directory tree so the utility has the same understanding of PN and preferred versions as bitbake. If you do want to go down this route I've put together this example: https://gist.github.com/bluelightning/6138980 Hope this helps. > Should this simple patch be accepted? And I will include bitbake parser > in follow-up patch. > Or > Drop this patch and waiting till bitbake parser has been included. I'd say let's accept this simple version for now after the naming/message corrections (especially since it's a contrib script) and then follow up with another patch when you have the bitbake-based version working. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core