Re: question about rpmdbInitIterator()

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

 



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...

Florian
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/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