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

Giuseppe Condorelli giuseppe.condorelli at gmail.com
Wed May 30 10:29:02 UTC 2012


Hi Paul,

just another clarification.

> If you aren't including packaging data in the resulting image (i.e.
> IMAGE_FEATURES does not contain "package-management"),

Adding the package-management I saw target rpm is set to be built.
So I can think I'll have the rpm inside the target fs I'll install via oe
system.
How can it help me if I query installed packages from host?

Cheers,
Giuseppe

2012/5/29 Giuseppe Condorelli <giuseppe.condorelli at gmail.com>

> 2012/5/29 Paul Eggleton <paul.eggleton at linux.intel.com>
>
>> On Tuesday 29 May 2012 15:20:14 Giuseppe Condorelli wrote:
>> > What I'm not understanding is how I can invoke my shell function. Do you
>> > mean I have to invoke it as append function of populate_rootfs one?
>>
>> If you aren't including packaging data in the resulting image (i.e.
>> IMAGE_FEATURES does not contain "package-management"), you need to do
>> your rpm
>> calls from a function called via ROOTFS_POSTPROCESS_COMMAND because
>> afterwards
>> the data will be removed and rpm will not be usable.
>>
>> > What I really need is a way to query the rpm database
>> > out from the build system, as we normally do with host packages.
>> > I tried to have a standalone run of  the rpm command the
>> > list_installed_packages invokes but (obviously) I got a long series of
>> > errors.
>>
>> Below is what I meant - you could put this into some bbclass that you
>> could
>> add using INHERIT += "someclass.bbclass" in local.conf:
>>
>> ------------- snip --------------
>> ROOTFS_POSTPROCESS_COMMAND += "do_some_packaging_stuff ; "
>>
>> do_some_packaging_stuff() {
>>        list_installed_packages > /path/to/output/file
>> }
>> ------------- snip --------------
>>
>> Substitute list_installed_packages for a similar rpm query command to the
>> one
>> list_installed_packages uses.
>>
> Yes!!!! Very very simple solution (that obviously I didn't though... :| ).
>
>
>>
>> Out of interest, what information are you querying from the packaging
>> system?
>>
> What I'm trying to obtain is a way to install and to query rpm packages
> out from build system.
> I mean, I would like to have the rpms built via bitbake/oe-core repository
> and than to install them
> into a specific root path without the build system support. Also, after
> having installed them (or part of
> them) I need to query the rpm database in case of debug.
> So I started asking my questions to understand if (internally) there was a
> way for querying (and it was!).
> This for backword compatibility with what I'm currently managing (a
> distribution totally rpm based) and
> what I'm thinking to implement in next future (a distribution oe based).
> For a while I would like both scenarios
> will exist in parallel.
> If you have other suggestions, or if you think my way to proceed is going
> to a black scenario, please don't
> hesitate to correct me.
>
>>
>> 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/20120530/668c4254/attachment-0002.html>


More information about the Openembedded-core mailing list