<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US">That was even simpler than I had thought. Nice! :)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US">//Peter<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Aaron Cohen <aaron@assonance.org>
<br>
<b>Sent:</b> den 28 februari 2020 21:40<br>
<b>To:</b> Peter Kjellerstedt <peter.kjellerstedt@axis.com><br>
<b>Cc:</b> Robert P. J. Day <rpjday@crashcourse.ca>; Mikko.Rapeli@bmw.de; bitbake-devel@lists.openembedded.org<br>
<b>Subject:</b> Re: [bitbake-devel] can i get a list of only bbappend'ed recipes that were *used* in a build?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 28, 2020 at 3:32 PM Peter Kjellerstedt <<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">> -----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.<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">pipe the package list through 'xargs bitbake-layers show-appends' and it seems exactly what's asked for.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>