summaryrefslogtreecommitdiff
path: root/lib/db1.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db1.c')
-rw-r--r--lib/db1.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/db1.c b/lib/db1.c
index fc4ccd81c..d0319c67b 100644
--- a/lib/db1.c
+++ b/lib/db1.c
@@ -1,9 +1,9 @@
-#include "system.h"
-
/** \ingroup db1
* \file lib/db1.c
*/
+#include "system.h"
+
static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */
#ifdef HAVE_DB1_DB_H
@@ -32,6 +32,9 @@ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */
#define DBC void
#include "rpmdb.h"
+
+#include "debug.h"
+
/*@access rpmdb@*/
/*@access dbiIndex@*/
/*@access dbiIndexSet@*/
@@ -136,6 +139,9 @@ static void * doGetRecord(FD_t pkgs, unsigned int offset)
if (h == NULL)
goto exit;
+ /* Retrofit "Provide: name = EVR" for binary packages. */
+ providePackageNVR(h);
+
/*
* The RPM used to build much of RH 5.1 could produce packages whose
* file lists did not have leading /'s. Now is a good time to fix that.
@@ -388,9 +394,9 @@ static int db1close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags)
db3Free(dbi);
if (base)
- xfree(base);
+ free((void *)base);
if (urlfn)
- xfree(urlfn);
+ free((void *)urlfn);
return rc;
}
@@ -468,11 +474,11 @@ exit:
db1close(dbi, 0);
if (base) {
- xfree(base);
+ free((void *)base);
base = NULL;
}
if (urlfn) {
- xfree(urlfn);
+ free((void *)urlfn);
urlfn = NULL;
}