16 #define _RPMTE_INTERNAL 75 char * kwlist[] = {
"debugLevel", NULL};
77 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"i", kwlist, &
_rpmte_debug))
97 return Py_BuildValue(
"s",
rpmteN(s->
te));
105 return Py_BuildValue(
"s",
rpmteE(s->
te));
113 return Py_BuildValue(
"s",
rpmteV(s->
te));
121 return Py_BuildValue(
"s",
rpmteR(s->
te));
124 #if defined(RPM_VENDOR_MANDRIVA) 130 return Py_BuildValue(
"s",
rpmteD(s->
te));
139 return Py_BuildValue(
"s",
rpmteA(s->
te));
147 return Py_BuildValue(
"s",
rpmteO(s->
te));
284 PyObject * TagN = NULL;
287 char * kwlist[] = {
"tag", NULL};
289 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O:DS", kwlist, &TagN))
294 PyErr_SetString(PyExc_TypeError,
"unknown tag type");
312 PyObject * TagN = NULL;
315 char * kwlist[] = {
"tag", NULL};
317 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O:FI", kwlist, &TagN))
322 PyErr_SetString(PyExc_TypeError,
"unknown tag type");
341 {
"Debug", (PyCFunction)
rpmte_Debug, METH_VARARGS|METH_KEYWORDS,
344 "te.Type() -> Type\n\ 345 - Return element type (rpm.TR_ADDED | rpm.TR_REMOVED).\n" },
346 {
"N", (PyCFunction)
rpmte_N, METH_NOARGS,
348 - Return element name.\n" },
349 {
"E", (PyCFunction)
rpmte_E, METH_NOARGS,
351 - Return element epoch.\n" },
352 {
"V", (PyCFunction)
rpmte_V, METH_NOARGS,
354 - Return element version.\n" },
355 {
"R", (PyCFunction)
rpmte_R, METH_NOARGS,
357 - Return element release.\n" },
359 {
"D", (PyCFunction)rpmte_D, METH_NOARGS,
361 - Return element distepoch.\n" },
363 {
"A", (PyCFunction)
rpmte_A, METH_NOARGS,
365 - Return element arch.\n" },
366 {
"O", (PyCFunction)
rpmte_O, METH_NOARGS,
368 - Return element os.\n" },
369 {
"NEVR", (PyCFunction)
rpmte_NEVR, METH_NOARGS,
370 "te.NEVR() -> NEVR\n\ 371 - Return element name-version-release.\n" },
373 "te.NEVRA() -> NEVRA\n\ 374 - Return element name-version-release.arch.\n" },
376 "te.Pkgid() -> Pkgid\n\ 377 - Return element pkgid (header+payload md5 digest).\n" },
379 "te.Hdrid() -> Hdrid\n\ 380 - Return element hdrid (header sha1 digest).\n" },
386 "te.Breadth() -> transaction element breadth index.\n" },
388 "te.Depth() -> transaction element depth index.\n" },
395 {
"Tree", (PyCFunction)
rpmte_Tree, METH_NOARGS,
401 {
"Key", (PyCFunction)
rpmte_Key, METH_NOARGS,
403 {
"DS", (PyCFunction)
rpmte_DS, METH_VARARGS|METH_KEYWORDS,
404 "te.DS(TagN) -> DS\n\ 405 - Return the TagN dependency set (or None). TagN is one of\n\ 406 'Providename', 'Requirename', 'Obsoletename', 'Conflictname'\n" },
407 {
"FI", (PyCFunction)
rpmte_FI, METH_VARARGS|METH_KEYWORDS,
408 "te.FI(TagN) -> FI\n\ 409 - Return the TagN dependency set (or None). TagN must be 'Basenames'.\n" },
427 default: tstr =
"??";
break;
436 return PyObject_GenericGetAttr(o, n);
442 return PyObject_GenericSetAttr(o, n, v);
455 PyObject_HEAD_INIT(&PyType_Type)
477 #
if Py_TPFLAGS_HAVE_ITER
#define RPM_VENDOR_MANDRIVA
static PyObject * rpmte_NEVR(rpmteObject *s)
rpmuint32_t rpmteColor(rpmte te)
Retrieve color bits of transaction element.
static PyObject * rpmte_Pkgid(rpmteObject *s)
static PyObject * rpmte_R(rpmteObject *s)
static PyObject * rpmte_Key(rpmteObject *s)
static PyObject * rpmte_getattro(PyObject *o, PyObject *n)
static PyObject * rpmte_NEVRA(rpmteObject *s)
const char * rpmteN(rpmte te)
Retrieve name string of transaction element.
static PyObject * rpmte_N(rpmteObject *s)
static int rpmte_print(rpmteObject *s, FILE *fp, int flags)
int rpmteDegree(rpmte te)
Retrieve number of children of transaction element.
int rpmteNpreds(rpmte te)
Retrieve tsort no.
rpmElementType rpmteType(rpmte te)
Retrieve type of transaction element.
const char * rpmteA(rpmte te)
Retrieve arch string of transaction element.
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
rpmds rpmteDS(rpmte te, rpmTag tag)
Retrieve dependency tag set from transaction element.
struct rpmte_s * rpmte
An element of a transaction set, i.e.
static PyObject * rpmte_PkgFileSize(rpmteObject *s)
const char * rpmteE(rpmte te)
Retrieve epoch string of transaction element.
static PyObject * rpmte_Breadth(rpmteObject *s)
static PyObject * rpmte_V(rpmteObject *s)
int rpmteBreadth(rpmte te)
Retrieve dependency tree breadth of transaction element.
static PyObject * rpmte_Debug(rpmteObject *s, PyObject *args, PyObject *kwds)
struct rpmteObject_s rpmteObject
const char * rpmteV(rpmte te)
Retrieve version string of transaction element.
const char * rpmteNEVR(rpmte te)
Retrieve name-version-release string from transaction element.
rpmte rpmteParent(rpmte te)
Retrieve parent transaction element.
int rpmteDepth(rpmte te)
Retrieve dependency tree depth of transaction element.
alKey rpmteAddedKey(rpmte te)
rpmfi rpmteFI(rpmte te, rpmTag tag)
Retrieve file info tag set from transaction element.
static PyObject * rpmte_FI(rpmteObject *s, PyObject *args, PyObject *kwds)
struct rpmfi_s * rpmfi
File info tag sets from a header, so that a header can be discarded early.
static PyObject * rpmte_Degree(rpmteObject *s)
static PyObject * rpmte_O(rpmteObject *s)
static PyObject * rpmte_Color(rpmteObject *s)
static PyObject * rpmte_Hdrid(rpmteObject *s)
static PyObject * rpmte_E(rpmteObject *s)
static PyObject * rpmte_Depth(rpmteObject *s)
const char * rpmteD(rpmte te)
Retrieve distepoch string of transaction element.
const char * rpmteNEVRA(rpmte te)
Retrieve name-version-release.arch string from transaction element.
static int rpmte_setattro(PyObject *o, PyObject *n, PyObject *v)
rpmdsObject * rpmds_Wrap(rpmds ds)
static PyObject * rpmte_TEType(rpmteObject *s)
const char * rpmteO(rpmte te)
Retrieve os string of transaction element.
const char * rpmteHdrid(rpmte te)
Retrieve hdrid string from transaction element.
rpmteObject * rpmte_Wrap(rpmte te)
static PyObject * rpmte_Tree(rpmteObject *s)
fnpyKey rpmteKey(rpmte te)
Retrieve key from transaction element.
static PyObject * rpmte_DBOffset(rpmteObject *s)
rpmfi rpmfiLink(rpmfi fi, const char *msg)
Reference a file info set instance.
rpmds rpmdsLink(rpmds ds, const char *msg)
Reference a dependency set instance.
static PyObject * rpmte_DS(rpmteObject *s, PyObject *args, PyObject *kwds)
static PyObject * rpmte_Parent(rpmteObject *s)
int rpmteDBOffset(rpmte te)
Retrieve rpmdb instance of TR_REMOVED transaction element.
rpmuint32_t rpmtePkgFileSize(rpmte te)
Retrieve size in bytes of package file.
static struct PyMethodDef rpmte_methods[]
rpmfiObject * rpmfi_Wrap(rpmfi fi)
static PyObject * rpmte_Npreds(rpmteObject *s)
const char * rpmtePkgid(rpmte te)
Retrieve pkgid string from transaction element.
int rpmteTree(rpmte te)
Retrieve tree index of transaction element.
const char * rpmteR(rpmte te)
Retrieve release string of transaction element.
static PyObject * rpmte_A(rpmteObject *s)
static PyObject * rpmte_AddedKey(rpmteObject *s)