From 6b9adb71f9715de3648673ae6ca4475a9e98d141 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 23 Sep 2009 10:49:47 +0300 Subject: [PATCH] Add te.NEVRA() method, adjust docs --- python/rpmte-py.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python/rpmte-py.c b/python/rpmte-py.c index 2187cea..f4b7d81 100644 --- a/python/rpmte-py.c +++ b/python/rpmte-py.c @@ -99,6 +99,12 @@ rpmte_NEVR(rpmteObject * s) } static PyObject * +rpmte_NEVRA(rpmteObject * s) +{ + return Py_BuildValue("s", rpmteNEVRA(s->te)); +} + +static PyObject * rpmte_Color(rpmteObject * s) { return Py_BuildValue("i", rpmteColor(s->te)); @@ -228,7 +234,10 @@ static struct PyMethodDef rpmte_methods[] = { - Return element os.\n" }, {"NEVR", (PyCFunction)rpmte_NEVR, METH_NOARGS, "te.NEVR() -> NEVR\n\ -- Return element name-version-release.\n" }, +- Return element name-[epoch:]version-release.\n" }, + {"NEVRA", (PyCFunction)rpmte_NEVRA, METH_NOARGS, +"te.NEVRA() -> NEVRA\n\ +- Return element name-[epoch:]version-release.arch\n" }, {"Color",(PyCFunction)rpmte_Color, METH_NOARGS, NULL}, {"PkgFileSize",(PyCFunction)rpmte_PkgFileSize, METH_NOARGS, -- 2.7.4