diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-04-05 11:45:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-04-05 12:22:34 +0300 |
commit | 6eec1f8a005db6ff9a1cce57afa5dba4253a06b2 (patch) | |
tree | 0ec9719df2b1de9fe420db79373c239414eec49b | |
parent | 4af06be2a496939f293bfdae6b0ca558ac6d1a33 (diff) | |
download | rpm-6eec1f8a005db6ff9a1cce57afa5dba4253a06b2.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.
-rw-r--r-- | include/rpm/rpmds.h | 3 | ||||
-rw-r--r-- | lib/psm.c | 1 | ||||
-rw-r--r-- | python/rpmds-py.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/rpm/rpmds.h b/include/rpm/rpmds.h index 66d7ab5c9..e37908b06 100644 --- a/include/rpm/rpmds.h +++ b/include/rpm/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 @@ -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/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, |