Re: RPM C API (and other fun acronyms)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 15, 2006, at 10:29 AM, R. Tyler Ballance wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been trying to develop something to tie into the C API for rpm (8), and I'm trying to search for a package in the rpm db, I've come across this document: http://www.rpm.org/max-rpm/s1-rpm-rpmlib- functions.html

Which has rpmdbFindPackage() listed, which is the perfect function call, yet on my redhat enterprise ES 4 box's librpm doesn't define that function call at all, in fact, it seems that NONE of the documentation is....current.

Anybody have any tips, or better/alternative means of querying for a certain package in the rpm db? Links to documentation concurrent with the latest major redhat enterprise release? More cowbell even? :)


There's doxygen doco for rpm's C API on your RHEL4 system:
	file:///usr/share/doc/rpm-devel-X.Y.Z/apidocs/*

There's the "RedHat RPM Guilde" someplace @redhat.com.

Hint: You want something like (this snippet retrieves the package that provides "bash"):

    rpmts ts = rpmtsCreate();
rpmdbMatchIterator mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, "bash", 0);
    Header h;

    while((h = rpmdbNextIterator(mi)) != NULL) {
	... do whatever with the bash header ...
    }
    mi = rpmdbFreeIterator(mi);
    ts = rpmtsFree(ts);

73 de Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFCrw6uHNkGyA5spERAj8GAJ9yIbWWGDEPwmIwNJ4bbGsXJdQQrQCg7hz7
IWXurUL6WWb/M+uDp0N6Vts=
=LJWC
-----END PGP SIGNATURE-----

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux