return obj;
}
-static PyObject* Repo_add_archive(RepoObject* self, PyObject* args) {
- ArchiveObject* archive = NULL;
-
- if (!PyArg_ParseTuple(args, "O!", &ArchiveType, &archive))
- return NULL;
-
- // Add package
- struct pakfire_package* pkg = pakfire_repo_add_archive(self->repo, archive->archive);
- assert(pkg);
-
- // Create Python object
- PyObject* obj = new_package(&PackageType, pkg);
- pakfire_package_unref(pkg);
-
- return obj;
-}
-
static PyObject* Repo_clean(RepoObject* self, PyObject* args) {
int r = pakfire_repo_clean(self->repo, 0);
METH_VARARGS,
NULL
},
- {
- "add_archive",
- (PyCFunction)Repo_add_archive,
- METH_VARARGS,
- NULL
- },
{ NULL }
};