16 #define _RPMTE_INTERNAL
77 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"i", kwlist, &
_rpmte_debug))
124 #if defined(RPM_VENDOR_MANDRIVA)
284 PyObject * TagN =
NULL;
289 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O:DS", kwlist, &TagN))
294 PyErr_SetString(PyExc_TypeError,
"unknown tag type");
308 rpmte_FI(
rpmteObject * s, PyObject * args, PyObject * kwds)
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,
343 {
"Type", (PyCFunction)rpmte_TEType, METH_NOARGS,
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" },
358 #
if defined(RPM_VENDOR_MANDRIVA)
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" },
372 {
"NEVRA", (PyCFunction)rpmte_NEVRA, METH_NOARGS,
373 "te.NEVRA() -> NEVRA\n\
374 - Return element name-version-release.arch.\n" },
375 {
"Pkgid", (PyCFunction)rpmte_Pkgid, METH_NOARGS,
376 "te.Pkgid() -> Pkgid\n\
377 - Return element pkgid (header+payload md5 digest).\n" },
378 {
"Hdrid", (PyCFunction)rpmte_Hdrid, METH_NOARGS,
379 "te.Hdrid() -> Hdrid\n\
380 - Return element hdrid (header sha1 digest).\n" },
381 {
"Color",(PyCFunction)rpmte_Color, METH_NOARGS,
383 {
"PkgFileSize",(PyCFunction)rpmte_PkgFileSize, METH_NOARGS,
385 {
"Breadth", (PyCFunction)rpmte_Breadth, METH_NOARGS,
386 "te.Breadth() -> transaction element breadth index.\n" },
387 {
"Depth", (PyCFunction)rpmte_Depth, METH_NOARGS,
388 "te.Depth() -> transaction element depth index.\n" },
389 {
"Npreds", (PyCFunction)rpmte_Npreds, METH_NOARGS,
391 {
"Degree", (PyCFunction)rpmte_Degree, METH_NOARGS,
393 {
"Parent", (PyCFunction)rpmte_Parent, METH_NOARGS,
395 {
"Tree", (PyCFunction)rpmte_Tree, METH_NOARGS,
397 {
"AddedKey",(PyCFunction)rpmte_AddedKey, METH_NOARGS,
399 {
"DBOffset",(PyCFunction)rpmte_DBOffset, 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)
461 (printfunc) rpmte_print,
477 #
if Py_TPFLAGS_HAVE_ITER
const char * rpmteV(rpmte te)
Retrieve version string of transaction element.
int rpmteBreadth(rpmte te)
Retrieve dependency tree breadth of transaction element.
rpmdsObject * rpmds_Wrap(rpmds ds)
const char * rpmteNEVRA(rpmte te)
Retrieve name-version-release.arch string from transaction element.
const char * rpmtePkgid(rpmte te)
Retrieve pkgid string from transaction element.
int rpmteTree(rpmte te)
Retrieve tree index of transaction element.
rpmuint32_t rpmteColor(rpmte te)
Retrieve color bits of transaction element.
struct rpmte_s * rpmte
An element of a transaction set, i.e.
struct rpmteObject_s rpmteObject
static PyObject * rpmte_getattro(PyObject *o, PyObject *n)
rpmfi rpmteFI(rpmte te, rpmTag tag)
Retrieve file info tag set from transaction element.
int rpmteDepth(rpmte te)
Retrieve dependency tree depth of transaction element.
rpmteObject * rpmte_Wrap(rpmte te)
int rpmteNpreds(rpmte te)
Retrieve tsort no.
const char * rpmteN(rpmte te)
Retrieve name string of transaction element.
static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject *static PyObject * Key
const char * rpmteA(rpmte te)
Retrieve arch string of transaction element.
rpmds rpmteDS(rpmte te, rpmTag tag)
Retrieve dependency tag set from transaction element.
static PyObject * rpmte_Debug(rpmteObject *s, PyObject *args, PyObject *kwds)
alKey rpmteAddedKey(rpmte te)
fprintf(stderr,"--> %s(%p,%p,%p) sig %p sigp %p\n", __FUNCTION__, dig, t, rsactx, sig, sigp)
static struct PyMethodDef rpmte_methods[]
rpmTag tagNumFromPyObject(PyObject *item)
static int rpmte_setattro(PyObject *o, PyObject *n, PyObject *v)
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
int rpmteDegree(rpmte te)
Retrieve number of children of transaction element.
const char * rpmteD(rpmte te)
Retrieve distepoch string of transaction element.
return Py_BuildValue("i", pkgKey)
rpmte rpmteParent(rpmte te)
Retrieve parent transaction element.
const char * rpmteO(rpmte te)
Retrieve os string of transaction element.
rpmfi rpmfiLink(rpmfi fi, const char *msg)
Reference a file info set instance.
const char * rpmteE(rpmte te)
Retrieve epoch string of transaction element.
rpmds rpmdsLink(rpmds ds, const char *msg)
Reference a dependency set instance.
rpmElementType rpmteType(rpmte te)
Retrieve type of transaction element.
const char * rpmteNEVR(rpmte te)
Retrieve name-version-release string from transaction element.
struct rpmfi_s * rpmfi
File info tag sets from a header, so that a header can be discarded early.
const char * rpmteR(rpmte te)
Retrieve release string of transaction element.
fnpyKey rpmteKey(rpmte te)
Retrieve key from transaction element.
int rpmteDBOffset(rpmte te)
Retrieve rpmdb instance of TR_REMOVED transaction element.
rpmfiObject * rpmfi_Wrap(rpmfi fi)
rpmuint32_t rpmtePkgFileSize(rpmte te)
Retrieve size in bytes of package file.
const char * rpmteHdrid(rpmte te)
Retrieve hdrid string from transaction element.
static PyObject *rpmds ds