]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
root: Remove the version comparison function
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 16:41:51 +0000 (16:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 16:41:51 +0000 (16:41 +0000)
This exists in the Python module as a separate thing now and we don't
gain anything any more from having a second function that is tied to
another pool.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/root.c
src/pakfire/root.h
src/python/root.c

index 2453773394cd157e305c6018b471eff179aecdcf..3f46034549f561bd7a53e127853e06d36cfe973d 100644 (file)
@@ -1320,10 +1320,6 @@ const char* pakfire_root_get_effective_arch(pakfire_root* self) {
        return self->arches.effective;
 }
 
-int pakfire_root_version_compare(pakfire_root* self, const char* evr1, const char* evr2) {
-       return pool_evrcmp_str(self->pool, evr1, evr2, EVRCMP_COMPARE);
-}
-
 Pool* pakfire_root_get_solv_pool(pakfire_root* self) {
        return self->pool;
 }
index 4b469d492dd2a8ab8be62edd30fc6ff8203ece14..2c0844dd13611c72a5153ccf8f7030af93b96f4b 100644 (file)
@@ -66,8 +66,6 @@ int pakfire_root_clean(pakfire_root* pakfire, int flags);
 
 const char* pakfire_root_get_arch(pakfire_root* pakfire);
 
-int pakfire_root_version_compare(pakfire_root* pakfire, const char* evr1, const char* evr2);
-
 pakfire_repo* pakfire_root_get_repo(pakfire_root* pakfire, const char* name);
 
 int pakfire_root_whatprovides(pakfire_root* pakfire, const char* what, int flags,
index 22f79e3b33a427742f2d7ca121fce813cc8d2e3d..3709d55ddfe72b57c8fd09f8d8e8386ba0263faf 100644 (file)
@@ -344,18 +344,6 @@ ERROR:
        return ret;
 }
 
-static PyObject* Root_version_compare(RootObject* self, PyObject* args) {
-       const char* evr1 = NULL;
-       const char* evr2 = NULL;
-
-       if (!PyArg_ParseTuple(args, "ss", &evr1, &evr2))
-               return NULL;
-
-       int cmp = pakfire_root_version_compare(self->root, evr1, evr2);
-
-       return PyLong_FromLong(cmp);
-}
-
 static PyObject* Root_dist(RootObject* self, PyObject* args) {
        pakfire_archive* archive = NULL;
        const char* path = NULL;
@@ -846,12 +834,6 @@ static struct PyMethodDef Root_methods[] = {
                METH_VARARGS|METH_KEYWORDS,
                NULL
        },
-       {
-               "version_compare",
-               (PyCFunction)Root_version_compare,
-               METH_VARARGS,
-               NULL
-       },
        {
                "whatprovides",
                (PyCFunction)Root_whatprovides,