summaryrefslogtreecommitdiff
path: root/python/rpmts-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-05 12:16:26 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-05 12:16:26 +0300
commit66589df18f7a54f724df5e859334418d9496e5ce (patch)
treeeb5d4d23f66f9165e20f5f519b6ffbe310c4ddb0 /python/rpmts-py.c
parent44ee4e164e340c0d4e4725cc57811ce637deaef3 (diff)
downloadlibrpm-tizen-66589df18f7a54f724df5e859334418d9496e5ce.tar.gz
librpm-tizen-66589df18f7a54f724df5e859334418d9496e5ce.tar.bz2
librpm-tizen-66589df18f7a54f724df5e859334418d9496e5ce.zip
Push transaction problem filter to python side
- make C-level ts.run() require ignoreSet just like the real one does and keep the value on python side of things
Diffstat (limited to 'python/rpmts-py.c')
-rw-r--r--python/rpmts-py.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index ab83321a8..f8337f1f1 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -139,7 +139,6 @@ struct rpmtsObject_s {
rpmts ts;
FD_t scriptFd;
rpmtsi tsi;
- rpmprobFilterFlags ignoreSet;
};
struct rpmtsCallbackType_s {
@@ -591,10 +590,11 @@ rpmts_Run(rpmtsObject * s, PyObject * args, PyObject * kwds)
{
int rc;
struct rpmtsCallbackType_s cbInfo;
- char * kwlist[] = {"callback", "data", NULL};
+ rpmprobFilterFlags ignoreSet;
+ char * kwlist[] = {"callback", "data", "ignoreSet", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO:Run", kwlist,
- &cbInfo.cb, &cbInfo.data))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOi:Run", kwlist,
+ &cbInfo.cb, &cbInfo.data, &ignoreSet))
return NULL;
cbInfo.tso = s;
@@ -608,7 +608,7 @@ rpmts_Run(rpmtsObject * s, PyObject * args, PyObject * kwds)
(void) rpmtsSetNotifyCallback(s->ts, rpmtsCallback, (void *) &cbInfo);
}
- rc = rpmtsRun(s->ts, NULL, s->ignoreSet);
+ rc = rpmtsRun(s->ts, NULL, ignoreSet);
if (cbInfo.cb)
(void) rpmtsSetNotifyCallback(s->ts, NULL, NULL);
@@ -855,11 +855,6 @@ static PyObject *rpmts_get_vsflags(rpmtsObject *s, void *closure)
static char rpmts_doc[] =
"";
-static PyMemberDef rpmts_members[] = {
- {"_probFilter", T_INT, offsetof(rpmtsObject, ignoreSet), 0, NULL},
- {NULL}
-};
-
static PyGetSetDef rpmts_getseters[] = {
/* only provide a setter until we have rpmfd wrappings */
{"scriptFd", NULL, (setter)rpmts_set_scriptFd, NULL },
@@ -902,7 +897,7 @@ PyTypeObject rpmts_Type = {
PyObject_SelfIter, /* tp_iter */
(iternextfunc) rpmts_iternext, /* tp_iternext */
rpmts_methods, /* tp_methods */
- rpmts_members, /* tp_members */
+ 0, /* tp_members */
rpmts_getseters, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */