]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Remove option to change installed repository
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Mar 2021 19:08:19 +0000 (19:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 13 Mar 2021 19:08:19 +0000 (19:08 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c
src/libpakfire/include/pakfire/pakfire.h
src/libpakfire/libpakfire.sym
src/libpakfire/pakfire.c

index be1ee0dc4c190b5efcc6dda49bf8566644b0d707..6dd4659205c49acb5ef91f8d7db4fc6f7a935274 100644 (file)
@@ -154,25 +154,6 @@ static PyObject* Pakfire_get_installed_repo(PakfireObject* self) {
        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);
 
@@ -791,7 +772,7 @@ static struct PyGetSetDef Pakfire_getsetters[] = {
        {
                "installed_repo",
                (getter)Pakfire_get_installed_repo,
-               (setter)Pakfire_set_installed_repo,
+               NULL,
                NULL,
                NULL
        },
index 00a8edeaf12772e27b7a8c59d4f7c03ea0e34c7f..9809e0b30ceeee78366d3bcf9aa7308572971259 100644 (file)
@@ -51,7 +51,6 @@ size_t pakfire_count_packages(Pakfire pakfire);
 
 PakfireRepo pakfire_get_repo(Pakfire pakfire, const char* name);
 PakfireRepo pakfire_get_installed_repo(Pakfire pakfire);
-void pakfire_set_installed_repo(Pakfire pakfire, PakfireRepo repo);
 
 PakfirePackageList pakfire_whatprovides(Pakfire pakfire, const char* provides, int flags);
 PakfirePackageList pakfire_search(Pakfire pakfire, const char* what, int flags);
index 5790240f040a71ad2df55a5a65bed43dd1b755bb..46b252e44f1d8c82114e95d8bd60a1075aa0396a 100644 (file)
@@ -39,7 +39,6 @@ global:
        pakfire_read_makefile;
        pakfire_ref;
        pakfire_search;
-       pakfire_set_installed_repo;
        pakfire_set_installonly;
        pakfire_unref;
        pakfire_version_compare;
index bcaf069669ed883b7d8862912cb353fca899c9e5..a7e77abf66e08d3213cb4b531a8c0241fbbcfff3 100644 (file)
@@ -114,7 +114,7 @@ static int pakfire_populate_pool(Pakfire pakfire) {
                goto ERROR;
 
        // Set this repository as the installed one
-       pakfire_set_installed_repo(pakfire, repo);
+       pool_set_installed(pool, pakfire_repo_get_repo(repo));
 
        // Load database content
        r = pakfire_db_load(db, repo);
@@ -520,15 +520,6 @@ PAKFIRE_EXPORT PakfireRepo pakfire_get_installed_repo(Pakfire pakfire) {
        return pakfire_repo_create_from_repo(pakfire, pakfire->pool->installed);
 }
 
-PAKFIRE_EXPORT void pakfire_set_installed_repo(Pakfire pakfire, PakfireRepo repo) {
-       if (!repo) {
-               pool_set_installed(pakfire->pool, NULL);
-               return;
-       }
-
-       pool_set_installed(pakfire->pool, pakfire_repo_get_repo(repo));
-}
-
 PAKFIRE_EXPORT const char** pakfire_get_installonly(Pakfire pakfire) {
        Queue q;
        queue_init_clone(&q, &pakfire->installonly);