diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-04-05 11:45:02 +0300 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2022-07-01 10:52:14 +0200 |
commit | adbd23898f1d62e2688b6d07dc7b1eb4ab097d6e (patch) | |
tree | 13c12c7927a9d05c7e08ac56493d754e1307547e | |
parent | 6745f12859368541e521ebeaf91544b34d0bf3a6 (diff) | |
download | rpm-adbd23898f1d62e2688b6d07dc7b1eb4ab097d6e.tar.gz |
Kick out --nopromote remnants, add compiler deprecation warnings
Bury the two remaining callers that somehow avoided the massacre in
commit 6800e0a4df14e03157a463b55cbe6adfa0ce0c3d, add compiler
deprecation warnings.
(cherry picked from commit 6eec1f8a005db6ff9a1cce57afa5dba4253a06b2)
-rw-r--r-- | lib/psm.c | 1 | ||||
-rw-r--r-- | lib/rpmds.h | 3 | ||||
-rw-r--r-- | python/rpmds-py.c | 5 |
3 files changed, 5 insertions, 4 deletions
@@ -288,7 +288,6 @@ static rpmRC handleOneTrigger(rpmts ts, rpmte te, rpmsenseFlags sense, return rc; headerGet(trigH, RPMTAG_INSTPREFIXES, &pfx, HEADERGET_ALLOC|HEADERGET_ARGV); - (void) rpmdsSetNoPromote(trigger, 1); while ((i = rpmdsNext(trigger)) >= 0) { uint32_t tix; diff --git a/lib/rpmds.h b/lib/rpmds.h index 8fec12a2f..ed1b4dee8 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -9,6 +9,7 @@ #include <time.h> #include <rpm/rpmtypes.h> +#include <rpm/rpmutil.h> #include <rpm/rpmps.h> #ifdef __cplusplus @@ -303,6 +304,7 @@ int rpmdsIsReverse(rpmds ds); * @param ds unused * @return 1 always */ +RPM_GNUC_DEPRECATED int rpmdsNoPromote(const rpmds ds); /** \ingroup rpmds @@ -311,6 +313,7 @@ int rpmdsNoPromote(const rpmds ds); * @param nopromote unused * @return 1 always */ +RPM_GNUC_DEPRECATED int rpmdsSetNoPromote(rpmds ds, int nopromote); /** \ingroup rpmds diff --git a/python/rpmds-py.c b/python/rpmds-py.c index cf7277e9e..2853ed2df 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -112,7 +112,7 @@ rpmds_SetNoPromote(rpmdsObject * s, PyObject * args, PyObject * kwds) &nopromote)) return NULL; - return Py_BuildValue("i", rpmdsSetNoPromote(s->ds, nopromote)); + return Py_BuildValue("i", 0); } /* XXX rpmdsFind uses bsearch on s->ds, so a sort is needed. */ @@ -208,8 +208,7 @@ static struct PyMethodDef rpmds_methods[] = { {"Color", (PyCFunction)rpmds_Color, METH_NOARGS, "ds.Color -> Color -- Return current Color.\n" }, {"SetNoPromote",(PyCFunction)rpmds_SetNoPromote, METH_VARARGS|METH_KEYWORDS, - "ds.SetNoPromote(noPromote) -- Set noPromote for this instance.\n\n" - "If True non existing epochs are no longer equal to an epoch of 0."}, + "ds.SetNoPromote(noPromote) -- Obsolete, do not use.\n"}, {"Sort", (PyCFunction)rpmds_Sort, METH_NOARGS, NULL}, {"Find", (PyCFunction)rpmds_Find, METH_O, |