From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Giuseppe Condorelli <giuseppe.condorelli@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: How to query installed rpm packages
Date: Mon, 28 May 2012 14:26:13 +0100 [thread overview]
Message-ID: <5252895.1gMWNIkXN5@helios> (raw)
In-Reply-To: <CAOHjBZsyWoca=JkLy==aqwYGwLeYYrNgR6PwwWMyNVjP0LSv5g@mail.gmail.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.
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
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-05-28 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-28 13:14 How to query installed rpm packages Giuseppe Condorelli
2012-05-28 13:26 ` Paul Eggleton [this message]
2012-05-28 15:30 ` Giuseppe Condorelli
2012-05-28 16:23 ` Paul Eggleton
2012-05-29 13:20 ` Giuseppe Condorelli
2012-05-29 13:32 ` Paul Eggleton
2012-05-29 13:49 ` Giuseppe Condorelli
2012-05-30 10:29 ` Giuseppe Condorelli
2012-05-30 10:34 ` Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5252895.1gMWNIkXN5@helios \
--to=paul.eggleton@linux.intel.com \
--cc=giuseppe.condorelli@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox