Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2022-03-17 16:24:41 +0300
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2022-03-29 07:56:13 +0300
commit7092ab2283477876bdcc5cd508848cc3976bca72 (patch)
tree0b02e3e8f0c8ed519ae9a612ed2babc7290307d9 /src
parent2395ffb5a9ba787ffa6464e51621310dcfac91ce (diff)
Remove python bindings for xml_parse_main_metadata_together
They are obsoleted by cr.PackageIterator
Diffstat (limited to 'src')
-rw-r--r--src/python/createrepo_cmodule.c2
-rw-r--r--src/python/xml_parser-py.c83
-rw-r--r--src/python/xml_parser-py.h8
3 files changed, 0 insertions, 93 deletions
diff --git a/src/python/createrepo_cmodule.c b/src/python/createrepo_cmodule.c
index fd6e7ef..ba6cad6 100644
--- a/src/python/createrepo_cmodule.c
+++ b/src/python/createrepo_cmodule.c
@@ -79,8 +79,6 @@ static struct PyMethodDef createrepo_c_methods[] = {
METH_VARARGS, xml_parse_repomd__doc__},
{"xml_parse_updateinfo", (PyCFunction)py_xml_parse_updateinfo,
METH_VARARGS, xml_parse_updateinfo__doc__},
- {"xml_parse_main_metadata_together",(PyCFunctionWithKeywords)py_xml_parse_main_metadata_together,
- METH_VARARGS | METH_KEYWORDS, xml_parse_main_metadata_together__doc__},
{"checksum_name_str", (PyCFunction)py_checksum_name_str,
METH_VARARGS, checksum_name_str__doc__},
{"checksum_type", (PyCFunction)py_checksum_type,
diff --git a/src/python/xml_parser-py.c b/src/python/xml_parser-py.c
index d9f05f9..1f9d981 100644
--- a/src/python/xml_parser-py.c
+++ b/src/python/xml_parser-py.c
@@ -708,89 +708,6 @@ py_xml_parse_updateinfo(G_GNUC_UNUSED PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-
-PyObject *
-py_xml_parse_main_metadata_together(G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
-{
- char *primary_filename;
- char *filelists_filename;
- char *other_filename;
- PyObject *py_newpkgcb, *py_pkgcb, *py_warningcb;
- CbData cbdata;
- GError *tmp_err = NULL;
- static char *kwlist[] = { "primary", "filelists", "other", "newpkgcb", "pkgcb",
- "warningcb", NULL };
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssOOO:py_xml_parse_main_metadata_together", kwlist,
- &primary_filename, &filelists_filename, &other_filename, &py_newpkgcb,
- &py_pkgcb, &py_warningcb )) {
- return NULL;
- }
-
- if (!PyCallable_Check(py_newpkgcb) && py_newpkgcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "newpkgcb must be callable or None");
- return NULL;
- }
-
- if (!PyCallable_Check(py_pkgcb) && py_pkgcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "pkgcb must be callable or None");
- return NULL;
- }
-
- if (!PyCallable_Check(py_warningcb) && py_warningcb != Py_None) {
- PyErr_SetString(PyExc_TypeError, "warningcb must be callable or None");
- return NULL;
- }
-
- if (py_newpkgcb == Py_None && py_pkgcb == Py_None) {
- PyErr_SetString(PyExc_ValueError, "both pkgcb and newpkgcb cannot be None");
- return NULL;
- }
-
- Py_XINCREF(py_newpkgcb);
- Py_XINCREF(py_pkgcb);
- Py_XINCREF(py_warningcb);
-
- cr_XmlParserNewPkgCb ptr_c_newpkgcb = NULL;
- cr_XmlParserPkgCb ptr_c_pkgcb = NULL;
- cr_XmlParserWarningCb ptr_c_warningcb = NULL;
-
- if (py_newpkgcb != Py_None)
- ptr_c_newpkgcb = c_newpkgcb;
- if (py_pkgcb != Py_None)
- ptr_c_pkgcb = c_pkgcb;
- if (py_warningcb != Py_None)
- ptr_c_warningcb = c_warningcb;
-
- cbdata.py_newpkgcb = py_newpkgcb;
- cbdata.py_pkgcb = py_pkgcb;
- cbdata.py_warningcb = py_warningcb;
- cbdata.py_pkgs = PyDict_New();
-
- cr_xml_parse_main_metadata_together(primary_filename,
- filelists_filename,
- other_filename,
- ptr_c_newpkgcb,
- &cbdata,
- ptr_c_pkgcb,
- &cbdata,
- ptr_c_warningcb,
- &cbdata,
- &tmp_err);
-
- Py_XDECREF(py_newpkgcb);
- Py_XDECREF(py_pkgcb);
- Py_XDECREF(py_warningcb);
- Py_XDECREF(cbdata.py_pkgs);
-
- if (tmp_err) {
- nice_exception(&tmp_err, NULL);
- return NULL;
- }
-
- Py_RETURN_NONE;
-}
-
typedef struct {
PyObject_HEAD
cr_PkgIterator *pkg_iterator;
diff --git a/src/python/xml_parser-py.h b/src/python/xml_parser-py.h
index df5c620..444b32c 100644
--- a/src/python/xml_parser-py.h
+++ b/src/python/xml_parser-py.h
@@ -64,14 +64,6 @@ PyDoc_STRVAR(xml_parse_updateinfo__doc__,
PyObject *py_xml_parse_updateinfo(PyObject *self, PyObject *args);
-PyDoc_STRVAR(xml_parse_main_metadata_together__doc__,
-"xml_parse_main_metadata_together(primary_filename, filelists_filename, other_filename, newpkgcb, pkgcb, warningcb) -> None\n\n"
-"Parse primary.xml, filelists.xml and other.xml together at the same time."
-"- It can handle if packages are not in the same order in all 3 files but memory requirements grow."
-"- It is not guaranteed that newpkgcb is always followed by pkgcb for the given package, it is possible newpkgcb will be called several times for different packages and only after that pkgcbs will be called.");
-
-PyObject *py_xml_parse_main_metadata_together(PyObject *self, PyObject *args, PyObject *kwargs);
-
extern PyTypeObject PkgIterator_Type;
#define PkgIteratorObject_Check(o) PyObject_TypeCheck(o, &PkgIterator_Type)