]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Make Pakfire parent object of Repo
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Jan 2018 18:59:01 +0000 (19:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Jan 2018 18:59:01 +0000 (19:59 +0100)
This allows us to phase out the Pool object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 files changed:
src/_pakfire/package.c
src/_pakfire/package.h
src/_pakfire/pakfire.c
src/_pakfire/pool.c
src/_pakfire/pool.h
src/_pakfire/repo.c
src/_pakfire/repo.h
src/libpakfire/include/pakfire/pakfire.h
src/libpakfire/include/pakfire/pool.h
src/libpakfire/include/pakfire/repo.h
src/libpakfire/include/pakfire/repocache.h
src/libpakfire/libpakfire.sym
src/libpakfire/pakfire.c
src/libpakfire/pool.c
src/libpakfire/repo.c
src/pakfire/repository/__init__.py
src/pakfire/repository/base.py

index 42027ba95e7ea490b2f849199be5671a82703f71..3be41aee0bb31659f22a628d5c18f6008d1012c1 100644 (file)
@@ -23,6 +23,7 @@
 #include <pakfire/file.h>
 #include <pakfire/package.h>
 #include <pakfire/relationlist.h>
+#include <pakfire/repo.h>
 #include <pakfire/util.h>
 
 #include "package.h"
@@ -458,7 +459,7 @@ static PyObject* Package_get_repo(PackageObject* self) {
        const char* name = pakfire_repo_get_name(repo);
        pakfire_repo_unref(repo);
 
-       return new_repo(self->pool, name);
+       return new_repo(self->pakfire, name);
 }
 
 static int Package_set_repo(PackageObject* self, PyObject* value) {
index 530dbb09e1b700c8300ca7387ed4f1a91f94f91c..d88c8cd495de55ae26d2fa5eff5267bb2fff0a23 100644 (file)
 #include <pakfire/package.h>
 #include <solv/pooltypes.h>
 
+#include "pakfire.h"
 #include "pool.h"
 
 typedef struct {
        PyObject_HEAD
+       PakfireObject* pakfire;
        PoolObject* pool;
        PakfirePackage package;
 } PackageObject;
index bdcc3a92b171ba6dda269227ba8ed26940c4b412..dd0c8bcfd65d16ecd7f5b6b235dd2f19b6a6dba6 100644 (file)
 
 #include <pakfire/pakfire.h>
 #include <pakfire/key.h>
+#include <pakfire/repo.h>
 
 #include "key.h"
 #include "pakfire.h"
+#include "repo.h"
 
 static PyObject* Pakfire_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {
        PakfireObject* self = (PakfireObject *)type->tp_alloc(type, 0);
@@ -75,6 +77,36 @@ static PyObject* Pakfire_get_arch(PakfireObject* self) {
     return PyUnicode_FromString(arch);
 }
 
+static PyObject* Pakfire_get_installed_repo(PakfireObject* self) {
+       PakfireRepo repo = pakfire_get_installed_repo(self->pakfire);
+       if (!repo)
+               Py_RETURN_NONE;
+
+       PyObject* obj = new_repo(self, pakfire_repo_get_name(repo));
+       Py_XINCREF(obj);
+
+       return obj;
+}
+
+static int Pakfire_set_installed_repo(PakfireObject* self, PyObject* value) {
+#if 0
+       if (PyObject_Not(value)) {
+               pakfire_pool_set_installed_repo(self->pool, NULL);
+               return 0;
+       }
+#endif
+
+       if (!PyObject_TypeCheck(value, &RepoType)) {
+               PyErr_SetString(PyExc_ValueError, "Argument must be a _pakfire.Repo object");
+               return -1;
+       }
+
+       RepoObject* repo = (RepoObject *)value;
+       pakfire_set_installed_repo(self->pakfire, repo->repo);
+
+       return 0;
+}
+
 static PyObject* _import_keylist(PakfireObject* pakfire, PakfireKey* keys) {
        PyObject* list = PyList_New(0);
 
@@ -168,6 +200,13 @@ static struct PyGetSetDef Pakfire_getsetters[] = {
                NULL,
                NULL
        },
+       {
+               "installed_repo",
+               (getter)Pakfire_get_installed_repo,
+               (setter)Pakfire_set_installed_repo,
+               NULL,
+               NULL
+       },
        {
                "keys",
                (getter)Pakfire_get_keys,
index 6d09e5f0683f70d6971708c4c68ac4e6065577ce..4f4f1f9a99468165e79e08c0458cdb19100e5c07 100644 (file)
@@ -32,7 +32,6 @@
 #include "pakfire.h"
 #include "pool.h"
 #include "relation.h"
-#include "repo.h"
 #include "util.h"
 
 static PyObject* Pool_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {
@@ -79,36 +78,6 @@ static Py_ssize_t Pool_len(PoolObject* self) {
        return pakfire_pool_count(self->pool);
 }
 
-static PyObject* Pool_get_installed_repo(PoolObject* self) {
-       PakfireRepo repo = pakfire_pool_get_installed_repo(self->pool);
-       if (!repo)
-               Py_RETURN_NONE;
-
-       PyObject* obj = new_repo(self, pakfire_repo_get_name(repo));
-       Py_XINCREF(obj);
-
-       return obj;
-}
-
-static int Pool_set_installed_repo(PoolObject* self, PyObject* value) {
-#if 0
-       if (PyObject_Not(value)) {
-               pakfire_pool_set_installed_repo(self->pool, NULL);
-               return 0;
-       }
-#endif
-
-       if (!PyObject_TypeCheck(value, &RepoType)) {
-               PyErr_SetString(PyExc_ValueError, "Argument must be a _pakfire.Repo object");
-               return -1;
-       }
-
-       RepoObject* repo = (RepoObject *)value;
-       pakfire_pool_set_installed_repo(self->pool, repo->repo);
-
-       return 0;
-}
-
 static PyObject* Pool_get_installonly(PoolObject* self) {
        const char** installonly = pakfire_pool_get_installonly(self->pool);
 
@@ -228,13 +197,6 @@ static struct PyGetSetDef Pool_getsetters[] = {
                NULL,
                NULL
        },
-       {
-               "installed_repo",
-               (getter)Pool_get_installed_repo,
-               (setter)Pool_set_installed_repo,
-               NULL,
-               NULL
-       },
        {
                "installonly",
                (getter)Pool_get_installonly,
index a4a1352120c016506d1ce5baa9bc0152494dfe4f..80f90e7c1c74730f746b18a071d9c9ddecc118aa 100644 (file)
@@ -28,9 +28,6 @@
 typedef struct {
        PyObject_HEAD
        PakfirePool pool;
-
-       // XXX COMPAT
-       Pool* _pool;
 } PoolObject;
 
 extern PyTypeObject PoolType;
index 25d5d19a9ae331dc627865cf1f569729fcaf8013..11669b63b5b9c61b6bff5203fb01f8ecd3fd0592 100644 (file)
@@ -29,8 +29,8 @@
 #include "package.h"
 #include "repo.h"
 
-PyObject* new_repo(PoolObject* pool, const char* name) {
-       PyObject* args = Py_BuildValue("Os", (PyObject *)pool, name);
+PyObject* new_repo(PakfireObject* pakfire, const char* name) {
+       PyObject* args = Py_BuildValue("Os", (PyObject *)pakfire, name);
        PyObject* repo = PyObject_CallObject((PyObject *)&RepoType, args);
 
        Py_DECREF(args);
@@ -41,7 +41,7 @@ PyObject* new_repo(PoolObject* pool, const char* name) {
 static PyObject* Repo_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {
        RepoObject* self = (RepoObject *)type->tp_alloc(type, 0);
        if (self) {
-               self->pool = NULL;
+               self->pakfire = NULL;
                self->repo = NULL;
        }
 
@@ -51,21 +51,21 @@ static PyObject* Repo_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {
 static void Repo_dealloc(RepoObject* self) {
        pakfire_repo_unref(self->repo);
 
-       Py_XDECREF(self->pool);
+       Py_XDECREF(self->pakfire);
        Py_TYPE(self)->tp_free((PyObject *)self);
 }
 
 static int Repo_init(RepoObject* self, PyObject* args, PyObject* kwds) {
-       PyObject* pool;
+       PakfireObject* pakfire;
        const char* name;
 
-       if (!PyArg_ParseTuple(args, "O!s", &PoolType, &pool, &name))
+       if (!PyArg_ParseTuple(args, "O!s", &PakfireType, &pakfire, &name))
                return -1;
 
-       self->pool = (PoolObject *)pool;
-       Py_INCREF(self->pool);
+       self->pakfire = pakfire;
+       Py_INCREF(self->pakfire);
 
-       self->repo = pakfire_repo_create(self->pool->pool, name);
+       self->repo = pakfire_repo_create(self->pakfire->pakfire, name);
 
        return 0;
 }
@@ -220,10 +220,11 @@ static PyObject* Repo__add_package(RepoObject* self, PyObject* args) {
        if (!PyArg_ParseTuple(args, "sss", &name, &evr, &arch))
                return NULL;
 
-       PakfirePool pool = pakfire_repo_pool(self->repo);
+       PakfirePool pool = pakfire_repo_get_pool(self->repo);
        PakfirePackage pkg = pakfire_package_create2(pool, self->repo, name, evr, arch);
 
-       return new_package(self->pool, pakfire_package_id(pkg));
+       // XXX must be self->pakfire instead of NULL
+       return new_package(NULL /* self->pakfire */, pakfire_package_id(pkg));
 }
 
 static PyObject* Repo_cache_age(RepoObject* self, PyObject* args) {
index 5780a7c73e1292307716b3264b6bae04376887d5..ecda9a28cb874fabbe6519899cfb85143003e55e 100644 (file)
 
 #include <Python.h>
 
-#include <pakfire/pool.h>
-#include <pakfire/repo.h>
+#include <pakfire/types.h>
 
-#include "pool.h"
+#include "pakfire.h"
 
 typedef struct {
     PyObject_HEAD
-    PoolObject* pool;
+    PakfireObject* pakfire;
     PakfireRepo repo;
-
-       // XXX COMPAT
-       void* _repo;
 } RepoObject;
 
 extern PyTypeObject RepoType;
 
-PyObject* new_repo(PoolObject* pool, const char* name);
+PyObject* new_repo(PakfireObject* pakfire, const char* name);
 
 #endif /* PYTHON_PAKFIRE_REPO_H */
index e56a0ed79dce211de427a5c26a9b321a1f883f35..e62dc73a42c0dc18b8ff5c38bb89f81d56bbb4ae 100644 (file)
@@ -35,4 +35,7 @@ const char* pakfire_get_arch(Pakfire pakfire);
 
 PakfirePool pakfire_get_pool(Pakfire pakfire);
 
+PakfireRepo pakfire_get_installed_repo(Pakfire pakfire);
+void pakfire_set_installed_repo(Pakfire pakfire, PakfireRepo repo);
+
 #endif /* PAKFIRE_PAKFIRE_H */
index bc96543e865099fec15b01ee9a88557ad0edeb83..8ba4f2b36f929030e76a969d3dd88528ca0ca402 100644 (file)
@@ -30,9 +30,6 @@ void pakfire_pool_unref(PakfirePool pool);
 int pakfire_pool_version_compare(PakfirePool pool, const char* evr1, const char* evr2);
 int pakfire_pool_count(PakfirePool pool);
 
-PakfireRepo pakfire_pool_get_installed_repo(PakfirePool pool);
-void pakfire_pool_set_installed_repo(PakfirePool pool, PakfireRepo repo);
-
 const char** pakfire_pool_get_installonly(PakfirePool pool);
 void pakfire_pool_set_installonly(PakfirePool pool, const char** installonly);
 
index 9c00d860ae2c342913e6f610e3723f9f79ab16c3..baf985205da75c4713a82348c17ff79eb86a6590 100644 (file)
 
 #include <pakfire/types.h>
 
-PakfireRepo pakfire_repo_create(PakfirePool pool, const char* name);
+PakfireRepo pakfire_repo_create(Pakfire pakfire, const char* name);
 
 PakfireRepo pakfire_repo_ref(PakfireRepo repo);
 PakfireRepo pakfire_repo_unref(PakfireRepo repo);
 
-PakfirePool pakfire_repo_pool(PakfireRepo repo);
+PakfirePool pakfire_repo_get_pool(PakfireRepo repo);
 
 int pakfire_repo_identical(PakfireRepo repo1, PakfireRepo repo2);
 int pakfire_repo_cmp(PakfireRepo repo1, PakfireRepo repo2);
@@ -61,7 +61,7 @@ int pakfire_repo_clean(PakfireRepo repo);
 
 #include <solv/repo.h>
 
-PakfireRepo pakfire_repo_create_from_repo(PakfirePool pool, Repo* r);
+PakfireRepo pakfire_repo_create_from_repo(Pakfire pakfire, Repo* r);
 
 PakfirePackage pakfire_repo_add_package(PakfireRepo repo);
 
index 19824165e6e76b0edb0f6eaedc87e49a021874ac..02f5307ae117ef13ee97f16c8a895842b1f24cb9 100644 (file)
@@ -46,7 +46,7 @@ struct _PakfireRepoCache {
 };
 
 inline PakfirePool pakfire_repocache_pool(PakfireRepoCache repo_cache) {
-       return pakfire_repo_pool(repo_cache->repo);
+       return pakfire_repo_get_pool(repo_cache->repo);
 }
 
 inline PakfireCache pakfire_repocache_cache(PakfireRepoCache repo_cache) {
index 5ab0b22e6adb9538ab657d94d3409ba38b40a43d..6876920992092232d3658f6939490f59ccfcd7ec 100644 (file)
@@ -24,9 +24,11 @@ global:
        pakfire_init;
        pakfire_create;
        pakfire_get_arch;
+       pakfire_get_installed_repo;
        pakfire_get_path;
        pakfire_get_pool;
        pakfire_ref;
+       pakfire_set_installed_repo;
        pakfire_unref;
 
        # archive
@@ -198,12 +200,10 @@ global:
        pakfire_pool_count;
        pakfire_pool_create;
        pakfire_pool_get_cache_path;
-       pakfire_pool_get_installed_repo;
        pakfire_pool_get_installonly;
        pakfire_pool_ref;
        pakfire_pool_search;
        pakfire_pool_set_cache_path;
-       pakfire_pool_set_installed_repo;
        pakfire_pool_set_installonly;
        pakfire_pool_unref;
        pakfire_pool_version_compare;
@@ -226,6 +226,7 @@ global:
        pakfire_repo_get_cache;
        pakfire_repo_get_name;
        pakfire_repo_get_enabled;
+       pakfire_repo_get_pool;
        pakfire_repo_get_priority;
        pakfire_repo_identical;
        pakfire_repo_internalize;
index 89675a80aa59d771cc78db71dc28837c4ceeaab5..a65c1e0045bf425d40c3b2d9ed4e78e6bbcb3900 100644 (file)
 #                                                                             #
 #############################################################################*/
 
+#include <solv/pool.h>
+
 #include <pakfire/logging.h>
 #include <pakfire/pakfire.h>
 #include <pakfire/pool.h>
 #include <pakfire/private.h>
+#include <pakfire/repo.h>
 #include <pakfire/system.h>
 #include <pakfire/types.h>
 #include <pakfire/util.h>
@@ -96,3 +99,22 @@ PAKFIRE_EXPORT const char* pakfire_get_arch(Pakfire pakfire) {
 PAKFIRE_EXPORT PakfirePool pakfire_get_pool(Pakfire pakfire) {
        return pakfire_pool_ref(pakfire->pool);
 }
+
+PAKFIRE_EXPORT PakfireRepo pakfire_get_installed_repo(Pakfire pakfire) {
+       Pool* p = pakfire_pool_get_solv_pool(pakfire->pool);
+       if (!p->installed)
+               return NULL;
+
+       return pakfire_repo_create_from_repo(pakfire, p->installed);
+}
+
+PAKFIRE_EXPORT void pakfire_set_installed_repo(Pakfire pakfire, PakfireRepo repo) {
+       Pool* p = pakfire_pool_get_solv_pool(pakfire->pool);
+
+       if (!repo) {
+               pool_set_installed(p, NULL);
+               return;
+       }
+
+       pool_set_installed(p, pakfire_repo_get_repo(repo));
+}
index 6ad59bd918ff52e5574a8f59ce84545023727a33..6bbf4f719b8dc6a0e7db6cacfb2e02ecc6fb8ea2 100644 (file)
@@ -136,24 +136,6 @@ void pakfire_pool_apply_changes(PakfirePool pool) {
        }
 }
 
-PAKFIRE_EXPORT PakfireRepo pakfire_pool_get_installed_repo(PakfirePool pool) {
-       Pool* p = pool->pool;
-
-       if (!p->installed)
-               return NULL;
-
-       return pakfire_repo_create_from_repo(pool, p->installed);
-}
-
-PAKFIRE_EXPORT void pakfire_pool_set_installed_repo(PakfirePool pool, PakfireRepo repo) {
-       if (!repo) {
-               pool_set_installed(pool->pool, NULL);
-               return;
-       }
-
-       pool_set_installed(pool->pool, pakfire_repo_get_repo(repo));
-}
-
 PAKFIRE_EXPORT const char** pakfire_pool_get_installonly(PakfirePool pool) {
        Queue q;
        queue_init_clone(&q, &pool->installonly);
index bab4435fe499f98dace853506e3e783847697507..518fc2ff0e9e53a658a0b7681e2befcbc3dc25da 100644 (file)
@@ -33,6 +33,7 @@
 #include <pakfire/errno.h>
 #include <pakfire/logging.h>
 #include <pakfire/package.h>
+#include <pakfire/pakfire.h>
 #include <pakfire/pool.h>
 #include <pakfire/private.h>
 #include <pakfire/repo.h>
@@ -44,7 +45,7 @@ const uint8_t XZ_HEADER_MAGIC[] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 };
 const size_t XZ_HEADER_LENGTH = sizeof(XZ_HEADER_MAGIC);
 
 struct _PakfireRepo {
-       PakfirePool pool;
+       Pakfire pakfire;
        Repo* repo;
        PakfireRepoCache cache;
        Repodata* filelist;
@@ -74,23 +75,29 @@ static PakfireRepo get_pakfire_repo_by_name(PakfirePool pool, const char* name)
        return NULL;
 }
 
-PAKFIRE_EXPORT PakfireRepo pakfire_repo_create(PakfirePool pool, const char* name) {
+PAKFIRE_EXPORT PakfireRepo pakfire_repo_create(Pakfire pakfire, const char* name) {
+       PakfirePool pool = pakfire_get_pool(pakfire);
+
        PakfireRepo repo = get_pakfire_repo_by_name(pool, name);
        if (repo) {
                repo->nrefs++;
+
+               pakfire_pool_unref(pool);
+
                return repo;
        }
 
        Pool* p = pakfire_pool_get_solv_pool(pool);
+       pakfire_pool_unref(pool);
 
        Repo* r = get_repo_by_name(p, name);
        if (!r)
                r = repo_create(p, name);
 
-       return pakfire_repo_create_from_repo(pool, r);
+       return pakfire_repo_create_from_repo(pakfire, r);
 }
 
-PAKFIRE_EXPORT PakfireRepo pakfire_repo_create_from_repo(PakfirePool pool, Repo* r) {
+PAKFIRE_EXPORT PakfireRepo pakfire_repo_create_from_repo(Pakfire pakfire, Repo* r) {
        // Return existing object if we have one
        if (r->appdata)
                return pakfire_repo_ref(r->appdata);
@@ -100,7 +107,7 @@ PAKFIRE_EXPORT PakfireRepo pakfire_repo_create_from_repo(PakfirePool pool, Repo*
                DEBUG("Allocated Repo at %p\n", repo);
                repo->nrefs = 1;
 
-               repo->pool = pakfire_pool_ref(pool);
+               repo->pakfire = pakfire_ref(pakfire);
                repo->repo = r;
                repo->cache = pakfire_repocache_create(repo);
 
@@ -124,7 +131,7 @@ static void pakfire_repo_free(PakfireRepo repo) {
        if (repo->cache)
                pakfire_repocache_free(repo->cache);
 
-       pakfire_pool_unref(repo->pool);
+       pakfire_unref(repo->pakfire);
 
        pakfire_free(repo);
        DEBUG("Released Repo at %p\n", repo);
@@ -149,8 +156,17 @@ Repodata* pakfire_repo_get_repodata(PakfireRepo repo) {
        return repo->filelist;
 }
 
-PAKFIRE_EXPORT PakfirePool pakfire_repo_pool(PakfireRepo repo) {
-       return repo->pool;
+PAKFIRE_EXPORT PakfirePool pakfire_repo_get_pool(PakfireRepo repo) {
+       return pakfire_get_pool(repo->pakfire);
+}
+
+static Pool* pakfire_repo_get_solv_pool(PakfireRepo repo) {
+       PakfirePool pool = pakfire_repo_get_pool(repo);
+
+       Pool* p = pakfire_pool_get_solv_pool(pool);
+       pakfire_pool_unref(pool);
+
+       return p;
 }
 
 PAKFIRE_EXPORT int pakfire_repo_identical(PakfireRepo repo1, PakfireRepo repo2) {
@@ -174,7 +190,7 @@ PAKFIRE_EXPORT int pakfire_repo_cmp(PakfireRepo repo1, PakfireRepo repo2) {
 }
 
 PAKFIRE_EXPORT int pakfire_repo_count(PakfireRepo repo) {
-       Pool* pool = pakfire_pool_get_solv_pool(repo->pool);
+       Pool* pool = pakfire_repo_get_solv_pool(repo);
        int cnt = 0;
 
        for (int i = 2; i < pool->nsolvables; i++) {
@@ -205,8 +221,9 @@ PAKFIRE_EXPORT int pakfire_repo_get_enabled(PakfireRepo repo) {
 PAKFIRE_EXPORT void pakfire_repo_set_enabled(PakfireRepo repo, int enabled) {
        repo->repo->disabled = !enabled;
 
-       PakfirePool pool = pakfire_repo_pool(repo);
+       PakfirePool pool = pakfire_repo_get_pool(repo);
        pakfire_pool_has_changed(pool);
+       pakfire_pool_unref(pool);
 }
 
 PAKFIRE_EXPORT int pakfire_repo_get_priority(PakfireRepo repo) {
@@ -218,11 +235,13 @@ PAKFIRE_EXPORT void pakfire_repo_set_priority(PakfireRepo repo, int priority) {
 }
 
 PAKFIRE_EXPORT int pakfire_repo_is_installed_repo(PakfireRepo repo) {
-       PakfirePool pool = pakfire_repo_pool(repo);
+       PakfireRepo installed_repo = pakfire_get_installed_repo(repo->pakfire);
+
+       int r = pakfire_repo_identical(repo, installed_repo);
 
-       PakfireRepo installed_repo = pakfire_pool_get_installed_repo(pool);
+       pakfire_repo_unref(installed_repo);
 
-       return pakfire_repo_identical(repo, installed_repo);
+       return r;
 }
 
 PAKFIRE_EXPORT int pakfire_repo_read_solv(PakfireRepo repo, const char* filename, int flags) {
@@ -384,7 +403,9 @@ PAKFIRE_EXPORT int pakfire_repo_read_solv_fp(PakfireRepo repo, FILE *f, int flag
                        return PAKFIRE_E_SOLV_CORRUPTED;
        }
 
-       pakfire_pool_has_changed(repo->pool);
+       PakfirePool pool = pakfire_get_pool(repo->pakfire);
+       pakfire_pool_has_changed(pool);
+       pakfire_pool_unref(pool);
 
        return ret;
 }
@@ -410,7 +431,11 @@ PAKFIRE_EXPORT int pakfire_repo_write_solv_fp(PakfireRepo repo, FILE *f, int fla
 PAKFIRE_EXPORT PakfirePackage pakfire_repo_add_package(PakfireRepo repo) {
        Id id = repo_add_solvable(repo->repo);
 
-       return pakfire_package_create(repo->pool, id);
+       PakfirePool pool = pakfire_get_pool(repo->pakfire);
+       PakfirePackage pkg = pakfire_package_create(pool, id);
+       pakfire_pool_unref(pool);
+
+       return pkg;
 }
 
 PAKFIRE_EXPORT PakfireRepoCache pakfire_repo_get_cache(PakfireRepo repo) {
index 3d2098ad8734fdd505a7150a79d24988bfe95741..1cbcb1ed80e5e7ff771a56dcb58becaa6fd066a7 100644 (file)
@@ -54,7 +54,7 @@ class Repositories(object):
                self.dummy = base.RepositoryDummy(self.pakfire)
 
                # Create the local repository.
-               self.local = self.pool.installed_repo = RepositorySystem(self.pakfire)
+               self.local = self.pakfire.installed_repo = RepositorySystem(self.pakfire)
                self.add_repo(self.local)
 
                # If we running in build mode, we include our local build repository.
index 52e697e140e5d638e6f50023790f331281bf1c2b..ea56d0eb053215c54054575e76059bbbb2c432e2 100644 (file)
@@ -31,7 +31,7 @@ class RepositoryFactory(_pakfire.Repo):
                self.pakfire = pakfire
 
                # Inherit
-               _pakfire.Repo.__init__(self, self.pakfire.pool, name)
+               _pakfire.Repo.__init__(self, self.pakfire, name)
 
                # Save description
                self.description = description