[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: More librpm queries
- From: Jeff Johnson <n3npq jbj gmail com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: More librpm queries
- Date: Fri, 20 Oct 2006 19:02:43 -0400
On Oct 19, 2006, at 3:55 PM, R. Tyler Ballance wrote:
Howdy again, I've been searching through some doxygen documentation
trying to figure out how to query the rpm db to find the vendor of
specific packages?
I'm already extracting the header information (NEVRA) and I wanted
to fish out the vendor of these packages as well (in most cases,
the vendor is red hat, but there's some Novell packages and other
third party vendors whose names we'd like to grab from the
installed rpm db)
The vendor tag is RPMTAG_VENDOR.
From the rpm CLI, you want
rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}: %{vendor}\n'
From C, you want to use headerGetEntry():
const char * vendor = NULL;
xx = headerGetEntry(h, RPMTAG_VENDOR, NULL, (void **)&vendor, NULL);
Be prepared for missing and erroneous data, the vendor tag contents
depends on how
a package was built.
73 de Jeff
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]