On Thursday, 28 September 2006, at 16:49:17 (-0500), R. Tyler Ballance wrote: > So I'm wondering, do I just not use rpmdbInitIterator() (since I've > got to set the key string there) and will rpmdbSetIteratorRE() > create the proper iterator for dumping all the packages on the > machine? To find matches to the name, something like this: dbmi = rpmdbInitIterator(dbh, RPMTAG_NAME, NULL, 0); if (dbmi) { rpmdbSetIteratorRE(dbmi, RPMTAG_NAME, RPMMIRE_DEFAULT, match_string); } if (! dbmi) { printf("No matches found in local RPM DB.\n"); } else { while ((hdr = rpmdbNextIterator(dbmi))) { ... } } "dbh" is the rpmdb handle, and match_string is the regex/wildcard/etc. The rest is fairly obvious. Michael -- Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <mej@xxxxxxxxx> n + 1, Inc., http://www.nplus1.net/ Author, Eterm (www.eterm.org) ----------------------------------------------------------------------- "Somebody love me; come and carry me away. Somebody need me to be the blue in their grey." -- Michael W. Smith _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list