Queue q;
queue_init(&q);
- rpmstate = rpm_state_create(pool_get_rootdir(pool));
+ rpmstate = rpm_state_create(pool, pool_get_rootdir(pool));
rpm_installedrpmdbids(rpmstate, "Providename", "redhat-release", &q);
if (q.count)
{
printf("Searching for file conflicts\n");
queue_init(&conflicts);
- fcstate.rpmstate = rpm_state_create(rootdir);
+ fcstate.rpmstate = rpm_state_create(pool, rootdir);
fcstate.newpkgscnt = newpkgs;
fcstate.checkq = &checkq;
fcstate.newpkgsfps = newpkgsfps;
struct rpm_by_state {
+ Pool *pool;
RpmHead *rpmhead;
int rpmheadsize;
}
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;
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);
#define RPM_ITERATE_FILELIST_NOGHOSTS (1 << 3)
/* create and free internal state, rootdir is the rootdir of the rpm database */
-extern void *rpm_state_create(const char *rootdir);
+extern void *rpm_state_create(Pool *pool, const char *rootdir);
extern void *rpm_state_free(void *rpmstate);
/* return all matching rpmdbids */
queue_init(&conflicts);
FOR_REPO_SOLVABLES(installed, p, s)
queue_push(&todo, p);
- state = rpm_state_create(pool_get_rootdir(pool));
+ state = rpm_state_create(pool, pool_get_rootdir(pool));
pool_findfileconflicts(pool, &todo, 0, &conflicts, FINDFILECONFLICTS_USE_SOLVABLEFILELIST | FINDFILECONFLICTS_CHECK_DIRALIASING | FINDFILECONFLICTS_USE_ROOTDIR, &iterate_handle, state);
rpm_state_free(state);
queue_free(&todo);