]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Make PakfirePool obscure
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 18:36:36 +0000 (19:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 18:36:36 +0000 (19:36 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
12 files changed:
src/libpakfire/include/pakfire/package.h
src/libpakfire/include/pakfire/pool.h
src/libpakfire/include/pakfire/relation.h
src/libpakfire/include/pakfire/repo.h
src/libpakfire/include/pakfire/selector.h
src/libpakfire/package.c
src/libpakfire/packagelist.c
src/libpakfire/pool.c
src/libpakfire/relation.c
src/libpakfire/repo.c
src/libpakfire/request.c
src/libpakfire/selector.c

index 5cfc545cce0a227747619db99637447d543da0ab..31e260edc09849183056efb08e0ed320853b4006 100644 (file)
@@ -154,14 +154,6 @@ struct _PakfirePackage {
        PakfireFile filelist;
 };
 
-static inline PakfirePool pakfire_package_pool(PakfirePackage pkg) {
-       return pkg->pool;
-}
-
-static inline Pool* pakfire_package_solv_pool(PakfirePackage pkg) {
-       return pakfire_package_pool(pkg)->pool;
-}
-
 #endif
 
 #endif /* PAKFIRE_PACKAGE_H */
index e99719822895d5498109bb7086f38bdc55f62991..bc96543e865099fec15b01ee9a88557ad0edeb83 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef PAKFIRE_POOL_H
 #define PAKFIRE_POOL_H
 
-#include <solv/pool.h>
-
 #include <pakfire/types.h>
 
 PakfirePool pakfire_pool_create(Pakfire pakfire);
@@ -47,18 +45,16 @@ PakfirePackageList pakfire_pool_search(PakfirePool pool, const char* what, int f
 
 #ifdef PAKFIRE_PRIVATE
 
-struct _PakfirePool {
-       Pool* pool;
-       int provides_ready;
-       Queue installonly;
-
-       PakfireCache cache;
-       int nrefs;
-};
+#include <solv/pool.h>
 
-void pakfire_pool_make_provides_ready(PakfirePool pool);
+Pool* pakfire_pool_get_solv_pool(PakfirePool pool);
 char* pakfire_pool_tmpdup(Pool* pool, const char* s);
 
+void pakfire_pool_has_changed(PakfirePool pool);
+void pakfire_pool_apply_changes(PakfirePool pool);
+
+Queue* pakfire_pool_get_installonly_queue(PakfirePool pool);
+
 #endif
 
 #endif /* PAKFIRE_POOL_H */
index 7df98869a693359a041a3c3a6c097c0b996130b9..1ff7a1e9c747e1a4e157c89a068faeec586b2a02 100644 (file)
@@ -46,12 +46,8 @@ struct _PakfireRelation {
        Id id;
 };
 
-static inline PakfirePool pakfire_relation_pool(PakfireRelation relation) {
-       return relation->pool;
-}
-
 static inline Pool* pakfire_relation_solv_pool(PakfireRelation relation) {
-       return pakfire_relation_pool(relation)->pool;
+       return pakfire_pool_get_solv_pool(relation->pool);
 }
 
 #endif
index 44ac244d92784d5dbc1107024cf72f2a3cf8ea25..20b8f8e63d3c94d2f700320964375915228a1526 100644 (file)
@@ -72,7 +72,7 @@ struct _PakfireRepo {
 PakfirePackage pakfire_repo_add_package(PakfireRepo repo);
 
 static inline Pool* pakfire_repo_solv_pool(PakfireRepo repo) {
-       return pakfire_repo_pool(repo)->pool;
+       return pakfire_pool_get_solv_pool(repo->pool);
 }
 
 static inline Repo* pakfire_repo_get_solv_repo(PakfireRepo repo) {
index 8b967340e3f1de7933ef6630ce16b875982a3448..cfc8048591a47ea3f8f6508cd7457b2e25c429b6 100644 (file)
@@ -47,12 +47,8 @@ struct _PakfireSelector {
        PakfireFilter f_arch;
 };
 
-static inline PakfirePool pakfire_selector_pool(PakfireSelector selector) {
-       return selector->pool;
-}
-
 static inline Pool* pakfire_selector_solv_pool(PakfireSelector selector) {
-       return pakfire_selector_pool(selector)->pool;
+       return pakfire_pool_get_solv_pool(selector->pool);
 }
 
 #endif
index c0afc72da4be156ab95a5a289da69ff23c9e598d..1c2db75279d439b27c6672215bf818c97a7d4dc2 100644 (file)
 #include <pakfire/repocache.h>
 #include <pakfire/util.h>
 
+static Pool* pakfire_package_get_solv_pool(PakfirePackage pkg) {
+    return pakfire_pool_get_solv_pool(pkg->pool);
+}
+
 static void pakfire_package_add_self_provides(PakfirePool pool, PakfirePackage pkg, const char* name, const char* evr) {
 #if 1
        PakfireRelation relation = pakfire_relation_create(pool, name, PAKFIRE_EQ, evr);
@@ -99,9 +103,9 @@ PAKFIRE_EXPORT void pakfire_package_free(PakfirePackage pkg) {
 }
 
 static Solvable* get_solvable(PakfirePackage pkg) {
-       PakfirePool pool = pakfire_package_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
 
-       return pool_id2solvable(pool->pool, pkg->id);
+       return pool_id2solvable(pool, pkg->id);
 }
 
 static Repo* pakfire_package_solv_repo(PakfirePackage pkg) {
@@ -111,7 +115,7 @@ static Repo* pakfire_package_solv_repo(PakfirePackage pkg) {
 }
 
 static Id pakfire_package_get_handle(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        return s - pool->solvables;
@@ -122,7 +126,7 @@ PAKFIRE_EXPORT int pakfire_package_identical(PakfirePackage pkg1, PakfirePackage
 }
 
 PAKFIRE_EXPORT int pakfire_package_cmp(PakfirePackage pkg1, PakfirePackage pkg2) {
-       Pool* pool = pakfire_package_solv_pool(pkg1);
+       Pool* pool = pakfire_package_get_solv_pool(pkg1);
 
        Solvable* s1 = get_solvable(pkg1);
        Solvable* s2 = get_solvable(pkg2);
@@ -162,7 +166,7 @@ PAKFIRE_EXPORT int pakfire_package_cmp(PakfirePackage pkg1, PakfirePackage pkg2)
 }
 
 PAKFIRE_EXPORT int pakfire_package_evr_cmp(PakfirePackage pkg1, PakfirePackage pkg2) {
-       Pool* pool = pakfire_package_solv_pool(pkg1);
+       Pool* pool = pakfire_package_get_solv_pool(pkg1);
 
        Solvable* s1 = get_solvable(pkg1);
        Solvable* s2 = get_solvable(pkg2);
@@ -175,7 +179,7 @@ PAKFIRE_EXPORT Id pakfire_package_id(PakfirePackage pkg) {
 }
 
 PAKFIRE_EXPORT char* pakfire_package_get_nevra(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        const char* nevra = pool_solvable2str(pool, s);
@@ -184,28 +188,28 @@ PAKFIRE_EXPORT char* pakfire_package_get_nevra(PakfirePackage pkg) {
 }
 
 PAKFIRE_EXPORT const char* pakfire_package_get_name(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        return pool_id2str(pool, s->name);
 }
 
 PAKFIRE_EXPORT void pakfire_package_set_name(PakfirePackage pkg, const char* name) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        s->name = pool_str2id(pool, name, 1);
 }
 
 PAKFIRE_EXPORT const char* pakfire_package_get_evr(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        return pool_id2str(pool, s->evr);
 }
 
 PAKFIRE_EXPORT void pakfire_package_set_evr(PakfirePackage pkg, const char* evr) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        s->evr = pool_str2id(pool, evr, 1);
@@ -239,7 +243,7 @@ static void split_evr(Pool* pool, const char* evr_c, char** epoch, char** versio
 }
 
 PAKFIRE_EXPORT unsigned long pakfire_package_get_epoch(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        char *e, *v, *r, *endptr;
 
     unsigned long epoch = 0;
@@ -257,7 +261,7 @@ PAKFIRE_EXPORT unsigned long pakfire_package_get_epoch(PakfirePackage pkg) {
 }
 
 PAKFIRE_EXPORT const char* pakfire_package_get_version(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        char *e, *v, *r;
 
        split_evr(pool, pakfire_package_get_evr(pkg), &e, &v, &r);
@@ -265,7 +269,7 @@ PAKFIRE_EXPORT const char* pakfire_package_get_version(PakfirePackage pkg) {
 }
 
 PAKFIRE_EXPORT const char* pakfire_package_get_release(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        char *e, *v, *r;
 
        split_evr(pool, pakfire_package_get_evr(pkg), &e, &v, &r);
@@ -273,14 +277,14 @@ PAKFIRE_EXPORT const char* pakfire_package_get_release(PakfirePackage pkg) {
 }
 
 PAKFIRE_EXPORT const char* pakfire_package_get_arch(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        return pool_id2str(pool, s->arch);
 }
 
 PAKFIRE_EXPORT void pakfire_package_set_arch(PakfirePackage pkg, const char* arch) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        s->arch = pool_str2id(pool, arch, 1);
@@ -430,7 +434,7 @@ PAKFIRE_EXPORT void pakfire_package_set_filename(PakfirePackage pkg, const char*
 }
 
 PAKFIRE_EXPORT int pakfire_package_is_installed(PakfirePackage pkg) {
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Solvable* s = get_solvable(pkg);
 
        return pool->installed == s->repo;
@@ -499,8 +503,7 @@ static PakfireRelationList pakfire_package_get_relationlist(PakfirePackage pkg,
        Solvable* s = get_solvable(pkg);
        solvable_lookup_idarray(s, type, &q);
 
-       PakfirePool pool = pakfire_package_pool(pkg);
-       PakfireRelationList relationlist = pakfire_relationlist_from_queue(pool, q);
+       PakfireRelationList relationlist = pakfire_relationlist_from_queue(pkg->pool, q);
 
        queue_free(&q);
 
@@ -884,7 +887,7 @@ static PakfireFile pakfire_package_fetch_legacy_filelist(PakfirePackage pkg) {
        PakfireFile file = NULL;
        PakfireRepo repo = pakfire_package_get_repo(pkg);
        Solvable* s = get_solvable(pkg);
-       Pool* p = pakfire_package_solv_pool(pkg);
+       Pool* p = pakfire_package_get_solv_pool(pkg);
        Repo* r = pakfire_repo_get_solv_repo(repo);
 
        int found_marker = 0;
@@ -923,7 +926,7 @@ static PakfireFile pakfire_package_fetch_filelist(PakfirePackage pkg) {
        pakfire_package_internalize_repo(pkg);
 
        PakfireFile file = NULL;
-       Pool* pool = pakfire_package_solv_pool(pkg);
+       Pool* pool = pakfire_package_get_solv_pool(pkg);
        Repo* repo = pakfire_package_solv_repo(pkg);
        Id handle = pakfire_package_get_handle(pkg);
 
index a604e678769d0e5c14c18a7866ad1a8d99d31109..0644bb9db25e0797373bfd8524e5533111497d2e 100644 (file)
@@ -94,7 +94,7 @@ PAKFIRE_EXPORT void pakfire_packagelist_push_if_not_exists(PakfirePackageList li
 PAKFIRE_EXPORT PakfirePackageList pakfire_packagelist_from_queue(PakfirePool _pool, Queue* q) {
        PakfirePackageList list = pakfire_packagelist_create();
 
-       Pool* pool = _pool->pool;
+       Pool* pool = pakfire_pool_get_solv_pool(_pool);
        Id p, pp;
        for (int i = 0; i < q->count; i += 2) {
                FOR_JOB_SELECT(p, pp, q->elements[i], q->elements[i + 1]) {
index 0b4bf2acf268ee2f7db677650f63264959d1d431..f05f7d8099f22981d19bcaa4e8d623d71e9aa75f 100644 (file)
 #include <pakfire/types.h>
 #include <pakfire/util.h>
 
+struct _PakfirePool {
+       Pool* pool;
+       int provides_ready;
+       Queue installonly;
+
+       PakfireCache cache;
+       int nrefs;
+};
+
 PAKFIRE_EXPORT PakfirePool pakfire_pool_create(Pakfire pakfire) {
        PakfirePool pool = pakfire_calloc(1, sizeof(*pool));
        if (pool) {
@@ -88,6 +97,10 @@ PAKFIRE_EXPORT void pakfire_pool_unref(PakfirePool pool) {
        pakfire_pool_free(pool);
 }
 
+Pool* pakfire_pool_get_solv_pool(PakfirePool pool) {
+       return pool->pool;
+}
+
 PAKFIRE_EXPORT int pakfire_pool_version_compare(PakfirePool pool, const char* evr1, const char* evr2) {
        return pool_evrcmp_str(pool->pool, evr1, evr2, EVRCMP_COMPARE);
 }
@@ -104,7 +117,11 @@ PAKFIRE_EXPORT int pakfire_pool_count(PakfirePool pool) {
        return cnt;
 }
 
-PAKFIRE_EXPORT void pakfire_pool_make_provides_ready(PakfirePool pool) {
+void pakfire_pool_has_changed(PakfirePool pool) {
+       pool->provides_ready = 0;
+}
+
+void pakfire_pool_apply_changes(PakfirePool pool) {
        if (!pool->provides_ready) {
                pool_addfileprovides(pool->pool);
                pool_createwhatprovides(pool->pool);
@@ -148,6 +165,10 @@ PAKFIRE_EXPORT const char** pakfire_pool_get_installonly(PakfirePool pool) {
        return installonly;
 }
 
+Queue* pakfire_pool_get_installonly_queue(PakfirePool pool) {
+       return &pool->installonly;
+}
+
 PAKFIRE_EXPORT void pakfire_pool_set_installonly(PakfirePool pool, const char** installonly) {
        queue_empty(&pool->installonly);
 
@@ -182,7 +203,7 @@ PAKFIRE_EXPORT PakfireCache pakfire_pool_get_cache(PakfirePool pool) {
 
 static PakfirePackageList pakfire_pool_dataiterator(PakfirePool pool, const char* what, int key, int flags) {
        PakfirePackageList list = pakfire_packagelist_create();
-       pakfire_pool_make_provides_ready(pool);
+       pakfire_pool_apply_changes(pool);
 
        int di_flags = 0;
        if (flags & PAKFIRE_SUBSTRING)
@@ -209,7 +230,7 @@ static PakfirePackageList pakfire_pool_dataiterator(PakfirePool pool, const char
 static PakfirePackageList pakfire_pool_search_name(PakfirePool _pool, const char* name, int flags) {
        if (!flags) {
                PakfirePackageList list = pakfire_packagelist_create();
-               pakfire_pool_make_provides_ready(_pool);
+               pakfire_pool_apply_changes(_pool);
 
                Pool* pool = _pool->pool;
                Id id = pool_str2id(pool, name, 0);
@@ -235,7 +256,7 @@ static PakfirePackageList pakfire_pool_search_name(PakfirePool _pool, const char
 static PakfirePackageList pakfire_pool_search_provides(PakfirePool _pool, const char* provides, int flags) {
        if (!flags) {
                PakfirePackageList list = pakfire_packagelist_create();
-               pakfire_pool_make_provides_ready(_pool);
+               pakfire_pool_apply_changes(_pool);
 
                Pool* pool = _pool->pool;
                Id id = pool_str2id(pool, provides, 0);
index 09c2eeff4a4167a49d3973c02a04140aca350b84..a1fe2c3a7b51bf63a8637e739db81fd7b3de6f2f 100644 (file)
@@ -45,7 +45,7 @@ static int cmptype2relflags(int type) {
 }
 
 PAKFIRE_EXPORT PakfireRelation pakfire_relation_create(PakfirePool pool, const char* name, int cmp_type, const char* evr) {
-       Pool* p = pool->pool;
+       Pool* p = pakfire_pool_get_solv_pool(pool);
 
        Id id = pool_str2id(p, name, 1);
 
index 9d4281cbefefe9d025d7227c89a32c8afba3bbd5..39ef4b64af176dc2effa01705d7abef6bc331999 100644 (file)
@@ -55,7 +55,9 @@ static Repo* get_repo_by_name(Pool* pool, const char* name) {
 }
 
 static PakfireRepo get_pakfire_repo_by_name(PakfirePool pool, const char* name) {
-       Repo* repo = get_repo_by_name(pool->pool, name);
+       Pool* p = pakfire_pool_get_solv_pool(pool);
+
+       Repo* repo = get_repo_by_name(p, name);
 
        if (repo)
                return repo->appdata;
@@ -70,9 +72,11 @@ PAKFIRE_EXPORT PakfireRepo pakfire_repo_create(PakfirePool pool, const char* nam
                return repo;
        }
 
-       Repo* r = get_repo_by_name(pool->pool, name);
+       Pool* p = pakfire_pool_get_solv_pool(pool);
+
+       Repo* r = get_repo_by_name(p, name);
        if (!r)
-               r = repo_create(pool->pool, name);
+               r = repo_create(p, name);
 
        return pakfire_repo_create_from_repo(pool, r);
 }
@@ -173,7 +177,7 @@ PAKFIRE_EXPORT void pakfire_repo_set_enabled(PakfireRepo repo, int enabled) {
        repo->repo->disabled = !enabled;
 
        PakfirePool pool = pakfire_repo_pool(repo);
-       pool->provides_ready = 0;
+       pakfire_pool_has_changed(pool);
 }
 
 PAKFIRE_EXPORT int pakfire_repo_get_priority(PakfireRepo repo) {
@@ -351,7 +355,7 @@ PAKFIRE_EXPORT int pakfire_repo_read_solv_fp(PakfireRepo repo, FILE *f, int flag
                        return PAKFIRE_E_SOLV_CORRUPTED;
        }
 
-       repo->pool->provides_ready = 0;
+       pakfire_pool_has_changed(repo->pool);
 
        return ret;
 }
index c87878c365388fd9f3480d4fa8d33a512cb8ebdb..a1dbb33508f624495719e7c7d7e2471d2b778ecf 100644 (file)
@@ -74,8 +74,9 @@ PAKFIRE_EXPORT PakfirePool pakfire_request_pool(PakfireRequest request) {
 
 static void init_solver(PakfireRequest request, int flags) {
        PakfirePool pool = pakfire_request_pool(request);
+       Pool* p = pakfire_pool_get_solv_pool(pool);
 
-       Solver* solver = solver_create(pool->pool);
+       Solver* solver = solver_create(p);
 
        /* Free older solver */
        if (request->solver) {
@@ -111,7 +112,7 @@ static int solve(PakfireRequest request, Queue* queue) {
                request->transaction = NULL;
        }
 
-       pakfire_pool_make_provides_ready(request->pool);
+       pakfire_pool_apply_changes(request->pool);
 
        if (solver_solve(request->solver, queue)) {
 #ifdef DEBUG
@@ -143,10 +144,10 @@ PAKFIRE_EXPORT int pakfire_request_solve(PakfireRequest request, int flags) {
        }
 
        /* turn off implicit obsoletes for installonly packages */
-       PakfirePool pool = request->pool;
-       for (int i = 0; i < pool->installonly.count; i++)
+       Queue* installonly = pakfire_pool_get_installonly_queue(request->pool);
+       for (int i = 0; i < installonly->count; i++)
                queue_push2(&queue, SOLVER_MULTIVERSION|SOLVER_SOLVABLE_PROVIDES,
-                       pool->installonly.elements[i]);
+                       installonly->elements[i]);
 
        // XXX EXCLUDES
 
index f0120c64f30ad754500ff4285ab285e455d620b9..b70b899f5f023a4d79a757f848861a3d2de22244 100644 (file)
@@ -164,7 +164,8 @@ static int filter_arch2queue(PakfirePool pool, const PakfireFilter f, Queue* que
 
        assert(f->cmp_type == PAKFIRE_EQ);
 
-       Id archid = str2archid(pool->pool, f->match);
+       Pool* p = pakfire_pool_get_solv_pool(pool);
+       Id archid = str2archid(p, f->match);
        if (archid == 0)
                return PAKFIRE_E_ARCH;
 
@@ -172,7 +173,7 @@ static int filter_arch2queue(PakfirePool pool, const PakfireFilter f, Queue* que
                assert((queue->elements[i] & SOLVER_SELECTMASK) == SOLVER_SOLVABLE_NAME);
 
                Id dep = queue->elements[i + 1];
-               queue->elements[i + 1] = pool_rel2id(pool->pool, dep, archid, REL_ARCH, 1);
+               queue->elements[i + 1] = pool_rel2id(p, dep, archid, REL_ARCH, 1);
                queue->elements[i] |= SOLVER_SETARCH;
        }
 
@@ -185,13 +186,14 @@ static int filter_evr2queue(PakfirePool pool, const PakfireFilter f, Queue* queu
 
        assert(f->cmp_type == PAKFIRE_EQ);
 
-       Id evr = pool_str2id(pool->pool, f->match, 1);
+       Pool* p = pakfire_pool_get_solv_pool(pool);
+       Id evr = pool_str2id(p, f->match, 1);
 
        for (int i = 0; i < queue->count; i += 2) {
                assert((queue->elements[i] & SOLVER_SELECTMASK) == SOLVER_SOLVABLE_NAME);
 
                Id dep = queue->elements[i + 1];
-               queue->elements[i + 1] = pool_rel2id(pool->pool, dep, evr, REL_EQ, 1);
+               queue->elements[i + 1] = pool_rel2id(p, dep, evr, REL_EQ, 1);
                queue->elements[i] |= PAKFIRE_PKG_VERSION ? SOLVER_SETEV : SOLVER_SETEVR;
        }
 
@@ -202,19 +204,20 @@ static int filter_name2queue(PakfirePool pool, const PakfireFilter f, Queue* que
        if (f == NULL)
                return 0;
 
+       Pool* p = pakfire_pool_get_solv_pool(pool);
        const char* name = f->match;
        Id id;
        Dataiterator di;
 
        switch (f->cmp_type) {
                case PAKFIRE_EQ:
-                       id = pool_str2id(pool->pool, name, 0);
+                       id = pool_str2id(p, name, 0);
                        if (id)
                                queue_push2(queue, SOLVER_SOLVABLE_NAME, id);
                        break;
 
                case PAKFIRE_GLOB:
-                       dataiterator_init(&di, pool->pool, 0, 0, SOLVABLE_NAME, name, SEARCH_GLOB);
+                       dataiterator_init(&di, p, 0, 0, SOLVABLE_NAME, name, SEARCH_GLOB);
 
                        while (dataiterator_step(&di)) {
                                assert(di.idp);
@@ -241,11 +244,12 @@ static int filter_provides2queue(PakfirePool pool, const PakfireFilter f, Queue*
        if (f == NULL)
                return 0;
 
+       Pool* p = pakfire_pool_get_solv_pool(pool);
        Id id;
 
        switch (f->cmp_type) {
                case PAKFIRE_EQ:
-                       id = pool_str2id(pool->pool, f->match, 0);
+                       id = pool_str2id(p, f->match, 0);
                        if (id)
                                queue_push2(queue, SOLVER_SOLVABLE_PROVIDES, id);
                        break;
@@ -271,7 +275,7 @@ PAKFIRE_EXPORT int pakfire_selector2queue(const PakfireSelector selector, Queue*
                goto finish;
        }
 
-       pakfire_pool_make_provides_ready(pool);
+       pakfire_pool_apply_changes(pool);
 
        ret = filter_name2queue(pool, selector->f_name, &queue_selector);
        if (ret)