Enable fast-import mode for headers from rpmdb
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Nov 2011 10:01:08 +0000 (12:01 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Nov 2011 10:09:44 +0000 (12:09 +0200)
- Assume our home turf is safe enough for this - in order to reach
  the rpmdb, headers must've gone through the more rigorous checking
  that's done through the rpmReadPackageFile() paths, plus in
  default configuration we'll be doing further verification on the
  header before loading the headers so the risk seems acceptable
  for the speed gain.

lib/rpmdb.c

index 0a87741..5e2c9de 100644 (file)
@@ -1737,7 +1737,7 @@ Header rpmdbNextIterator(rpmdbMatchIterator mi)
     void * keyp;
     size_t keylen;
     int rc;
-    headerImportFlags importFlags = 0;
+    headerImportFlags importFlags = HEADERIMPORT_FAST;
 
     if (mi == NULL)
        return NULL;