<div>Hi Paul,</div><div> </div><div>first of all many thanks for your quick reply. :)<br><br></div><div class="gmail_quote">2012/5/28 Paul Eggleton <span dir="ltr"><<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>></span><br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div class="HOEnZb"><div class="h5">On Monday 28 May 2012 15:14:32 Giuseppe Condorelli wrote:<br>
> I need to query, via rpm command, the packages installed building an own<br>
> image recipe.<br>
> I know the populate_rootfs step for images uses rpm to install the packages<br>
> (if we set PACKAGE_CLASSES).<br>
> To do this it sets a dbpath and a root path for installing the packages.<br>
> I need to know how to query them (rpm -qa ....) given that dbpath is set to<br>
> /var/lib/rpm but I think it actually doesn't override<br>
> the real /var/lib/rpm database (also I'm not building as superuser).<br>
<br>
</div></div>Have a look at list_installed_packages() in classes/rootfs_rpm.bbclass; that<br>
does exactly this. You can call this from your own shell function which you<br>
can add to ROOTFS_POSTPROCESS_COMMAND.<br></blockquote><div> </div><div>Well, I added ROOTFS_POSTPROCESS_COMMAND += "list_installed_packages ; " in the image recipe I want to build.</div><div>Build went right but I don't know where to find the output the list_installed_packages has provided.</div>
<div>Any suggestion? Am I wrong?</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
<br>
Note that if all you want is a listing of the installed packages in a file that<br>
gets written every time an image is built, you can get that using buildhistory<br>
without any extra work:<br>
<br>
<a href="https://wiki.yoctoproject.org/wiki/Buildhistory" target="_blank">https://wiki.yoctoproject.org/wiki/Buildhistory</a><br></blockquote><div> </div><div>I've tried this and the generated output is very usefull for me.</div>
<div>At the moment, given that I already had all the packages built, it created only the image history information.</div><div>Now I'll run a clean build to collect also packages info.</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
<br>
Cheers,<br>
Paul<br></blockquote><div>Cheers,</div><div>Giuseppe </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
<br>
--<br>
<br>
Paul Eggleton<br>
Intel Open Source Technology Centre<br>
</blockquote></div><br>