<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 28, 2020 at 3:32 PM Peter Kjellerstedt <<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> -----Original Message-----<br>
> From: <a href="mailto:bitbake-devel-bounces@lists.openembedded.org" target="_blank">bitbake-devel-bounces@lists.openembedded.org</a> <bitbake-devel-<br>
> <a href="mailto:bounces@lists.openembedded.org" target="_blank">bounces@lists.openembedded.org</a>> On Behalf Of Robert P. J. Day<br>
> Sent: den 28 februari 2020 20:38<br>
> To: <a href="mailto:Mikko.Rapeli@bmw.de" target="_blank">Mikko.Rapeli@bmw.de</a><br>
> Cc: <a href="mailto:bitbake-devel@lists.openembedded.org" target="_blank">bitbake-devel@lists.openembedded.org</a><br>
> Subject: Re: [bitbake-devel] can i get a list of only bbappend'ed recipes<br>
> that were *used* in a build?<br>
> <br>
> On Fri, 28 Feb 2020, <a href="mailto:Mikko.Rapeli@bmw.de" target="_blank">Mikko.Rapeli@bmw.de</a> wrote:<br>
> <br>
> > Hi,<br>
> ><br>
> > On Fri, Feb 28, 2020 at 08:33:36AM -0500, <a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a> wrote:<br>
> > > looked around and i don't see an immediately obvious way to do<br>
> > > this ... is there a way to generate a list of *only* those recipes<br>
> > > that were used in the current build that had associated .bbappend<br>
> > > files?<br>
> > ><br>
> > > "bitbake-layers show-appends" will show all recipes with .bbappend<br>
> > > files, including those that are not included and processed for the<br>
> > > current build/image. here's the rationale, in case i'm missing<br>
> > > something.<br>
> ><br>
> > I'm doing "find meta* -name \*recipe\*bb\*" and reviewing every one<br>
> > of them. More visibility to this including parsing order would be<br>
> > nice to store in e.g. buildhistory.<br>
> <br>
> thanks for clarifying that there wasn't a massively trivial way to<br>
> do this that i just didn't see.<br>
<br>
For each image you build, you should find a manifest in <br>
"tmp/deploy/image/<machine>/<image>-<machine>.manifest". It contains the <br>
names, architectures and versions of all packages that were installed in <br>
the image. <br>
<br>
To convert the package names from the manifest to recipes, you can use <br>
oe-pkgdata-util:<br>
<br>
oe-pkgdata-util -p tmp/pkgdata/<machine> package-info -f <path to the manifest file><br>
<br>
(the -p tmp/pkgdata/<machine> option isn't necessary, but you avoid <br>
starting tinfoil if you use it). This will give you one line per package <br>
that also includes the recipe name. Pass the output to `cut -f3 -d' ' | <br>
sort -u' and you should have the list of recipes that were used to build <br>
the packages in your image.<br>
<br>
Then all you have to do is take the intersection of recipes from that <br>
list and from `bitbake-layers show-appends` and you should have the <br>
list of recipes that have bbappends applied and are used to build your <br>
image.<br><br></blockquote><div><br></div><div>pipe the package list through 'xargs bitbake-layers show-appends' and it seems exactly what's asked for.</div><div><br></div><div>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<br></div><div><br></div><div> </div></div></div>