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);
{
"installed_repo",
(getter)Pakfire_get_installed_repo,
- (setter)Pakfire_set_installed_repo,
+ NULL,
NULL,
NULL
},
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);
pakfire_read_makefile;
pakfire_ref;
pakfire_search;
- pakfire_set_installed_repo;
pakfire_set_installonly;
pakfire_unref;
pakfire_version_compare;
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);
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);