16 #define _RPMTE_INTERNAL
75 char * kwlist[] = {
"debugLevel", NULL};
77 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"i", kwlist, &
_rpmte_debug))
96 return Py_BuildValue(
"s",
rpmteN(s->
te));
104 return Py_BuildValue(
"s",
rpmteE(s->
te));
112 return Py_BuildValue(
"s",
rpmteV(s->
te));
120 return Py_BuildValue(
"s",
rpmteR(s->
te));
123 #if defined(RPM_VENDOR_MANDRIVA)
129 return Py_BuildValue(
"s",
rpmteD(s->
te));
138 return Py_BuildValue(
"s",
rpmteA(s->
te));
146 return Py_BuildValue(
"s",
rpmteO(s->
te));
283 PyObject * TagN = NULL;
286 char * kwlist[] = {
"tag", NULL};
288 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O:DS", kwlist, &TagN))
293 PyErr_SetString(PyExc_TypeError,
"unknown tag type");
310 PyObject * TagN = NULL;
313 char * kwlist[] = {
"tag", NULL};
315 DEPRECATED_METHOD(
"use .Files() instead");
316 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O:FI", kwlist, &TagN))
321 PyErr_SetString(PyExc_TypeError,
"unknown tag type");
339 {
"Debug", (PyCFunction)
rpmte_Debug, METH_VARARGS|METH_KEYWORDS,
342 "te.Type() -> Type\n\
343 - Return element type (rpm.TR_ADDED | rpm.TR_REMOVED).\n" },
344 {
"N", (PyCFunction)
rpmte_N, METH_NOARGS,
346 - Return element name.\n" },
347 {
"E", (PyCFunction)
rpmte_E, METH_NOARGS,
349 - Return element epoch.\n" },
350 {
"V", (PyCFunction)
rpmte_V, METH_NOARGS,
352 - Return element version.\n" },
353 {
"R", (PyCFunction)
rpmte_R, METH_NOARGS,
355 - Return element release.\n" },
356 #
if defined(RPM_VENDOR_MANDRIVA)
357 {
"D", (PyCFunction)rpmte_D, METH_NOARGS,
359 - Return element distepoch.\n" },
361 {
"A", (PyCFunction)
rpmte_A, METH_NOARGS,
363 - Return element arch.\n" },
364 {
"O", (PyCFunction)
rpmte_O, METH_NOARGS,
366 - Return element os.\n" },
367 {
"NEVR", (PyCFunction)
rpmte_NEVR, METH_NOARGS,
368 "te.NEVR() -> NEVR\n\
369 - Return element name-version-release.\n" },
371 "te.NEVRA() -> NEVRA\n\
372 - Return element name-version-release.arch.\n" },
374 "te.Pkgid() -> Pkgid\n\
375 - Return element pkgid (header+payload md5 digest).\n" },
377 "te.Hdrid() -> Hdrid\n\
378 - Return element hdrid (header sha1 digest).\n" },
384 "te.Breadth() -> transaction element breadth index.\n" },
386 "te.Depth() -> transaction element depth index.\n" },
393 {
"Tree", (PyCFunction)
rpmte_Tree, METH_NOARGS,
399 {
"Key", (PyCFunction)
rpmte_Key, METH_NOARGS,
401 {
"DS", (PyCFunction)
rpmte_DS, METH_VARARGS|METH_KEYWORDS,
402 "te.DS(TagN) -> DS\n\
403 - Return the TagN dependency set (or None). TagN is one of\n\
404 'Providename', 'Requirename', 'Obsoletename', 'Conflictname'\n" },
405 {
"FI", (PyCFunction)
rpmte_FI, METH_VARARGS|METH_KEYWORDS,
406 "te.FI(TagN) -> FI\n\
407 - Return the TagN dependency set (or None). TagN must be 'Basenames'.\n" },
425 default: tstr =
"??";
break;
441 PyVarObject_HEAD_INIT(&PyType_Type, 0)
457 PyObject_GenericGetAttr,
458 PyObject_GenericSetAttr,
462 #
if Py_TPFLAGS_HAVE_ITER
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_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.
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.
const char const bson int mongo_write_concern int flags
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)