[bitbake-devel] can i get a list of only bbappend'ed recipes that were *used* in a build?

Peter Kjellerstedt peter.kjellerstedt at axis.com
Fri Feb 28 20:46:29 UTC 2020


That was even simpler than I had thought. Nice! :)

//Peter

From: Aaron Cohen <aaron at assonance.org>
Sent: den 28 februari 2020 21:40
To: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Cc: Robert P. J. Day <rpjday at crashcourse.ca>; Mikko.Rapeli at bmw.de; bitbake-devel at lists.openembedded.org
Subject: Re: [bitbake-devel] can i get a list of only bbappend'ed recipes that were *used* in a build?


On Fri, Feb 28, 2020 at 3:32 PM Peter Kjellerstedt <peter.kjellerstedt at axis.com<mailto:peter.kjellerstedt at axis.com>> wrote:
> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org<mailto:bitbake-devel-bounces at lists.openembedded.org> <bitbake-devel-
> bounces at lists.openembedded.org<mailto:bounces at lists.openembedded.org>> On Behalf Of Robert P. J. Day
> Sent: den 28 februari 2020 20:38
> To: Mikko.Rapeli at bmw.de<mailto:Mikko.Rapeli at bmw.de>
> Cc: bitbake-devel at lists.openembedded.org<mailto:bitbake-devel at lists.openembedded.org>
> Subject: Re: [bitbake-devel] can i get a list of only bbappend'ed recipes
> that were *used* in a build?
>
> On Fri, 28 Feb 2020, Mikko.Rapeli at bmw.de<mailto:Mikko.Rapeli at bmw.de> wrote:
>
> > Hi,
> >
> > On Fri, Feb 28, 2020 at 08:33:36AM -0500, rpjday at crashcourse.ca<mailto:rpjday at crashcourse.ca> wrote:
> > > looked around and i don't see an immediately obvious way to do
> > > this ... is there a way to generate a list of *only* those recipes
> > > that were used in the current build that had associated .bbappend
> > > files?
> > >
> > > "bitbake-layers show-appends" will show all recipes with .bbappend
> > > files, including those that are not included and processed for the
> > > current build/image. here's the rationale, in case i'm missing
> > > something.
> >
> > I'm doing "find meta* -name \*recipe\*bb\*" and reviewing every one
> > of them. More visibility to this including parsing order would be
> > nice to store in e.g. buildhistory.
>
>   thanks for clarifying that there wasn't a massively trivial way to
> do this that i just didn't see.

For each image you build, you should find a manifest in
"tmp/deploy/image/<machine>/<image>-<machine>.manifest". It contains the
names, architectures and versions of all packages that were installed in
the image.

To convert the package names from the manifest to recipes, you can use
oe-pkgdata-util:

  oe-pkgdata-util -p tmp/pkgdata/<machine> package-info -f <path to the manifest file>

(the -p tmp/pkgdata/<machine> option isn't necessary, but you avoid
starting tinfoil if you use it). This will give you one line per package
that also includes the recipe name. Pass the output to `cut -f3 -d' ' |
sort -u' and you should have the list of recipes that were used to build
the packages in your image.

Then all you have to do is take the intersection of recipes from that
list and from `bitbake-layers show-appends` and you should have the
list of recipes that have bbappends applied and are used to build your
image.

pipe the package list through 'xargs bitbake-layers show-appends' and it seems exactly what's asked for.

oe-pkgdata-util -p tmp/pkgdata/<machine> package-info -f tmp/deploy/images/<machine>/<image>.manifest | cut -f3 -d' ' | sort -u | xargs bitbake-layers show-appends


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20200228/c26494c3/attachment.html>


More information about the bitbake-devel mailing list