RPM and Detailed Querytag Research
skvidal at fedoraproject.org
Thu Jun 7 05:20:15 UTC 2012
On Wed, 6 Jun 2012 15:04:30 -0700 (PDT)
Joe Wulf <joe_wulf at yahoo.com> wrote:
> How can I get a listing of all the internal meta-data for any
> particular RPM, regardless of the OS, dot-release or architecture of
> the host platform, or the RPM itself? On an RHEL 4.6 x32 system, how
> to get all of the internal RPM meta-data listed out of a RHEL 5.8 x64
> bit rpm? So, for example, the RHEL5.8 rpm could have something in
> the "PRIORITY" tag, that the 4.8 version of rpm might not know about.
> if I use the latest edition of the OS, can I safely iterate through
> all the querytags it knows about (for all the rpms), and get results
> when they exist? In other words, would the latest edition of RHEL
> (6.2 today) know about all the possible querytags used/available in
> all past editions of the OS (including back to RHEL3, yes really)?
> concern is for meta-data inside an RPM (for querytag_XYZ) that the
> current installed instance of rpm might not know about. How do I
> just query for what is 'in' the RPM itself regardless of the OS
> version, dot release or architecture (of either the host, or the
> basis for this is that I'm looking to develop a database which would
> contain meta-data about every rpm, from almost all rpm-based OSs (or,
> at least the important ones, like: Red Hat, CENTOS, Fedora,
> Scientific Linux, Mint, etc...). I've got the ISOs for all these
> OS's to iterate through for each RPM, but am researching for the
> optimal method to approach this.
> Thanks in advance for all the help, it really is appreciated.
You can just dump the full set of tags in the header of the pkg itself.
You can take something like:
python -i hdropen.py <path to some rpm>
>>> for tag in hdr:
... print '%s : %s' % (tag, hdr[tag])
which should then print an enormous mount of stuff :)
More information about the Rpm-list