summaryrefslogtreecommitdiff
path: root/ext/repo_rpmdb.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-04-15 14:19:02 +0200
committerMichael Schroeder <mls@suse.de>2013-04-15 14:19:02 +0200
commit1da63a9e704f9143c09c0c02c29669c85bee6de2 (patch)
tree70f35a619c3d193ca6d31aee4e9921c379cc512d /ext/repo_rpmdb.c
parent97c5738b5a8c038cf1b893d4509c5da0c62e99f6 (diff)
downloadlibsolv-1da63a9e704f9143c09c0c02c29669c85bee6de2.tar.gz
libsolv-1da63a9e704f9143c09c0c02c29669c85bee6de2.tar.bz2
libsolv-1da63a9e704f9143c09c0c02c29669c85bee6de2.zip
add pool parameter to rpm_state_create so that we can use pool_error for error reporting
Diffstat (limited to 'ext/repo_rpmdb.c')
-rw-r--r--ext/repo_rpmdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 20b3715..fc55537 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -2268,6 +2268,7 @@ rpm_query(void *rpmhandle, Id what)
struct rpm_by_state {
+ Pool *pool;
RpmHead *rpmhead;
int rpmheadsize;
@@ -2429,10 +2430,11 @@ freestate(struct rpm_by_state *state)
}
void *
-rpm_state_create(const char *rootdir)
+rpm_state_create(Pool *pool, const char *rootdir)
{
struct rpm_by_state *state;
state = solv_calloc(1, sizeof(*state));
+ state->pool = pool;
if (rootdir)
state->rootdir = solv_strdup(rootdir);
return state;
@@ -3195,6 +3197,7 @@ repo_add_rpmdb_pubkeys(Repo *repo, int flags)
rootdir = pool_get_rootdir(pool);
memset(&state, 0, sizeof(state));
+ state.pool = pool;
if (!(state.dbenv = opendbenv(rootdir)))
return 0;
entries = getinstalledrpmdbids(&state, "Name", "gpg-pubkey", &nentries, 0);