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
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list