[OE-core] [oe-core] How to query installed rpm packages

Giuseppe Condorelli giuseppe.condorelli at gmail.com
Mon May 28 15:30:34 UTC 2012


Hi Paul,

first of all many thanks for your quick reply. :)

2012/5/28 Paul Eggleton <paul.eggleton at linux.intel.com>

> On Monday 28 May 2012 15:14:32 Giuseppe Condorelli wrote:
> > I need to query, via rpm command, the packages installed building an own
> > image recipe.
> > I know the populate_rootfs step for images uses rpm to install the
> packages
> > (if we set PACKAGE_CLASSES).
> > To do this it sets a dbpath and a root path for installing the packages.
> > I need to know how to query them (rpm -qa ....) given that dbpath is set
> to
> > /var/lib/rpm but I think it actually doesn't override
> > the real /var/lib/rpm database (also I'm not building as superuser).
>
> Have a look at list_installed_packages() in classes/rootfs_rpm.bbclass;
> that
> does exactly this. You can call this from your own shell function which you
> can add to ROOTFS_POSTPROCESS_COMMAND.
>

Well, I added ROOTFS_POSTPROCESS_COMMAND += "list_installed_packages ; " in
the image recipe I want to build.
Build went right but I don't know where to find the output the
list_installed_packages has provided.
Any suggestion? Am I wrong?


>
> Note that if all you want is a listing of the installed packages in a file
> that
> gets written every time an image is built, you can get that using
> buildhistory
> without any extra work:
>
> https://wiki.yoctoproject.org/wiki/Buildhistory
>

I've tried this and the generated output is very usefull for me.
At the moment, given that I already had all the packages built, it created
only the image history information.
Now I'll run a clean build to collect also packages info.


>
> Cheers,
> Paul
>
Cheers,
Giuseppe

>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120528/b7e63528/attachment-0002.html>


More information about the Openembedded-core mailing list