question about rpmdbInitIterator()

FlorianFesti ffesti at
Sat Nov 6 21:02:37 UTC 2010

  On 11/05/2010 03:48 AM, David Peterson wrote:
> Looking in rpmdb.h, I see the following function:
>     rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmTag rpmtag, 
> const void* keyp, size_t keylen);
> My question is, what is the set of valid inputs that the function is 
> supposed to
> handle for the 'keyp' parameter?  For instance, is a regular 
> expression for
> matching package names ok, or is the set of valid inputs more constrained
> than that?
It only allows either a string that is matched as is or NULL for all. 
You can use rpmdbSetIteratorRE to restrict the results (typically using  
RPMTAG_PACKAGES, NULL for rpmdbInitIterator). Unfortunately this does 
not give you any performance benefit. RPM still loads and inspects all 
headers. Sorry, the API (and the implementation) isn't very helpful in 
this area...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Rpm-list mailing list