<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 11/05/2010 03:48 AM, David Peterson wrote:
    <blockquote
cite="mid:OF6D40BA30.8A4E72DF-ON872577D2.000E999B-882577D2.000F62CD@us.ibm.com"
      type="cite"><font face="sans-serif" size="2">Looking in rpmdb.h, I
        see the following
        function:</font>
      <br>
      <br>
      <font face="sans-serif" size="2">&nbsp; &nbsp; rpmdbMatchIterator
        rpmdbInitIterator(rpmdb
        db, rpmTag rpmtag, const void* keyp, size_t keylen);</font>
      <br>
      <br>
      <font face="sans-serif" size="2">My question is, what is the set
        of valid
        inputs that the function is supposed to</font>
      <br>
      <font face="sans-serif" size="2">handle for the 'keyp' parameter?
        &nbsp;For
        instance, is a regular expression for</font>
      <br>
      <font face="sans-serif" size="2">matching package names ok, or is
        the
        set of valid inputs more constrained</font>
      <br>
      <font face="sans-serif" size="2">than that?</font><br>
    </blockquote>
    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&nbsp; RPMTAG_PACKAGES, NULL for <font face="sans-serif"
      size="2">rpmdbInitIterator</font>). 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...<br>
    <br>
    Florian<br>
  </body>
</html>