<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 &lt;<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>&gt; 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">&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:bitbake-devel-bounces@lists.openembedded.org" target="_blank">bitbake-devel-bounces@lists.openembedded.org</a> &lt;bitbake-devel-<br>
&gt; <a href="mailto:bounces@lists.openembedded.org" target="_blank">bounces@lists.openembedded.org</a>&gt; On Behalf Of Robert P. J. Day<br>
&gt; Sent: den 28 februari 2020 20:38<br>
&gt; To: <a href="mailto:Mikko.Rapeli@bmw.de" target="_blank">Mikko.Rapeli@bmw.de</a><br>
&gt; Cc: <a href="mailto:bitbake-devel@lists.openembedded.org" target="_blank">bitbake-devel@lists.openembedded.org</a><br>
&gt; Subject: Re: [bitbake-devel] can i get a list of only bbappend&#39;ed recipes<br>
&gt; that were *used* in a build?<br>
&gt; <br>
&gt; On Fri, 28 Feb 2020, <a href="mailto:Mikko.Rapeli@bmw.de" target="_blank">Mikko.Rapeli@bmw.de</a> wrote:<br>
&gt; <br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; On Fri, Feb 28, 2020 at 08:33:36AM -0500, <a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a> wrote:<br>
&gt; &gt; &gt; looked around and i don&#39;t see an immediately obvious way to do<br>
&gt; &gt; &gt; this ... is there a way to generate a list of *only* those recipes<br>
&gt; &gt; &gt; that were used in the current build that had associated .bbappend<br>
&gt; &gt; &gt; files?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &quot;bitbake-layers show-appends&quot; will show all recipes with .bbappend<br>
&gt; &gt; &gt; files, including those that are not included and processed for the<br>
&gt; &gt; &gt; current build/image. here&#39;s the rationale, in case i&#39;m missing<br>
&gt; &gt; &gt; something.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m doing &quot;find meta* -name \*recipe\*bb\*&quot; and reviewing every one<br>
&gt; &gt; of them. More visibility to this including parsing order would be<br>
&gt; &gt; nice to store in e.g. buildhistory.<br>
&gt; <br>
&gt;   thanks for clarifying that there wasn&#39;t a massively trivial way to<br>
&gt; do this that i just didn&#39;t see.<br>
<br>
For each image you build, you should find a manifest in <br>
&quot;tmp/deploy/image/&lt;machine&gt;/&lt;image&gt;-&lt;machine&gt;.manifest&quot;. 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/&lt;machine&gt; package-info -f &lt;path to the manifest file&gt;<br>
<br>
(the -p tmp/pkgdata/&lt;machine&gt; option isn&#39;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&#39; &#39; | <br>
sort -u&#39; 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 &#39;xargs bitbake-layers show-appends&#39; and it seems exactly what&#39;s asked for.</div><div><br></div><div>oe-pkgdata-util -p tmp/pkgdata/&lt;machine&gt; package-info -f tmp/deploy/images/&lt;machine&gt;/&lt;image&gt;.manifest | cut -f3 -d&#39; &#39; | sort -u | xargs bitbake-layers show-appends<br></div><div><br></div><div> </div></div></div>