summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/rpmds-py.c15
-rw-r--r--python/rpmfi-py.c15
-rw-r--r--python/rpmps-py.c27
-rw-r--r--python/rpmte-py.c13
-rw-r--r--python/rpmts-py.c106
5 files changed, 0 insertions, 176 deletions
diff --git a/python/rpmds-py.c b/python/rpmds-py.c
index 7bfa2efb3..930eb4d4c 100644
--- a/python/rpmds-py.c
+++ b/python/rpmds-py.c
@@ -61,17 +61,6 @@ void rpmds_ParseEVR(char * evr,
}
static PyObject *
-rpmds_Debug(rpmdsObject * s, PyObject * args, PyObject * kwds)
-{
- char * kwlist[] = {"debugLevel", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &_rpmds_debug))
- return NULL;
-
- Py_RETURN_NONE;
-}
-
-static PyObject *
rpmds_Count(rpmdsObject * s)
{
return Py_BuildValue("i", rpmdsCount(s->ds));
@@ -340,8 +329,6 @@ rpmds_Problem(rpmdsObject * s)
#endif
static struct PyMethodDef rpmds_methods[] = {
- {"Debug", (PyCFunction)rpmds_Debug, METH_VARARGS|METH_KEYWORDS,
- NULL},
{"Count", (PyCFunction)rpmds_Count, METH_NOARGS,
"ds.Count -> Count - Return no. of elements.\n" },
{"Ix", (PyCFunction)rpmds_Ix, METH_NOARGS,
@@ -445,8 +432,6 @@ static int rpmds_init(rpmdsObject * s, PyObject *args, PyObject *kwds)
static void rpmds_free(rpmdsObject * s)
{
-if (_rpmds_debug)
-fprintf(stderr, "%p -- ds %p\n", s, s->ds);
s->ds = rpmdsFree(s->ds);
PyObject_Del((PyObject *)s);
diff --git a/python/rpmfi-py.c b/python/rpmfi-py.c
index 72582b9f9..20be11979 100644
--- a/python/rpmfi-py.c
+++ b/python/rpmfi-py.c
@@ -16,17 +16,6 @@ struct rpmfiObject_s {
};
static PyObject *
-rpmfi_Debug(rpmfiObject * s, PyObject * args, PyObject * kwds)
-{
- char * kwlist[] = {"debugLevel", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &_rpmfi_debug))
- return NULL;
-
- Py_RETURN_NONE;
-}
-
-static PyObject *
rpmfi_FC(rpmfiObject * s)
{
return Py_BuildValue("i", rpmfiFC(s->fi));
@@ -218,8 +207,6 @@ rpmfi_iternext(rpmfiObject * s)
}
static struct PyMethodDef rpmfi_methods[] = {
- {"Debug", (PyCFunction)rpmfi_Debug, METH_VARARGS|METH_KEYWORDS,
- NULL},
{"FC", (PyCFunction)rpmfi_FC, METH_NOARGS,
NULL},
{"FX", (PyCFunction)rpmfi_FX, METH_NOARGS,
@@ -323,8 +310,6 @@ static int rpmfi_init(rpmfiObject * s, PyObject *args, PyObject *kwds)
static void rpmfi_free(rpmfiObject * s)
{
-if (_rpmfi_debug)
-fprintf(stderr, "%p -- fi %p\n", s, s->fi);
s->fi = rpmfiFree(s->fi);
PyObject_Del((PyObject *)s);
diff --git a/python/rpmps-py.c b/python/rpmps-py.c
index ba8d16a8f..7e0ad9976 100644
--- a/python/rpmps-py.c
+++ b/python/rpmps-py.c
@@ -11,17 +11,6 @@ struct rpmpsObject_s {
rpmpsi psi;
};
-static PyObject *
-rpmps_Debug(rpmpsObject * s, PyObject * args, PyObject * kwds)
-{
- char * kwlist[] = {"debugLevel", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &_rpmps_debug))
- return NULL;
-
- Py_RETURN_NONE;
-}
-
static int
rpmps_append(rpmpsObject * s, PyObject * value)
{
@@ -47,9 +36,6 @@ rpmps_iternext(rpmpsObject * s)
{
PyObject * result = NULL;
-if (_rpmps_debug < 0)
-fprintf(stderr, "*** rpmps_iternext(%p) ps %p psi %p\n", s, s->ps, s->psi);
-
/* Reset loop indices on 1st entry. */
if (s->psi == NULL) {
s->psi = rpmpsInitIterator(s->ps);
@@ -68,8 +54,6 @@ fprintf(stderr, "*** rpmps_iternext(%p) ps %p psi %p\n", s, s->ps, s->psi);
}
static struct PyMethodDef rpmps_methods[] = {
- {"Debug", (PyCFunction)rpmps_Debug, METH_VARARGS|METH_KEYWORDS,
- NULL},
{"append", (PyCFunction)rpmps_append, METH_VARARGS, NULL},
{NULL, NULL} /* sentinel */
};
@@ -77,8 +61,6 @@ static struct PyMethodDef rpmps_methods[] = {
static void
rpmps_dealloc(rpmpsObject * s)
{
-if (_rpmps_debug < 0)
-fprintf(stderr, "*** rpmps_dealloc(%p)\n", s);
if (s) {
s->ps = rpmpsFree(s->ps);
PyObject_Del(s);
@@ -88,8 +70,6 @@ fprintf(stderr, "*** rpmps_dealloc(%p)\n", s);
static int
rpmps_print(rpmpsObject * s, FILE * fp, int flags)
{
-if (_rpmps_debug < 0)
-fprintf(stderr, "*** rpmps_print(%p,%p,%x)\n", s, (void *)fp, flags);
if (s && s->ps)
rpmpsPrint(fp, s->ps);
return 0;
@@ -100,8 +80,6 @@ rpmps_length(rpmpsObject * s)
{
int rc;
rc = rpmpsNumProblems(s->ps);
-if (_rpmps_debug < 0)
-fprintf(stderr, "*** rpmps_length(%p) rc %d\n", s, rc);
return rc;
}
@@ -131,9 +109,6 @@ rpmps_subscript(rpmpsObject * s, PyObject * key)
}
psi = rpmpsFreeIterator(psi);
-if (_rpmps_debug < 0)
-fprintf(stderr, "*** rpmps_subscript(%p,%p) %s\n", s, key, PyString_AsString(result));
-
return result;
}
@@ -144,8 +119,6 @@ static PyMappingMethods rpmps_as_mapping = {
static void rpmps_free(rpmpsObject * s)
{
-if (_rpmps_debug)
-fprintf(stderr, "%p -- ps %p\n", s, s->ps);
s->ps = rpmpsFree(s->ps);
PyObject_Del((PyObject *)s);
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index b63a7a1dd..5fe7e2517 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -51,17 +51,6 @@ struct rpmteObject_s {
};
static PyObject *
-rpmte_Debug(rpmteObject * s, PyObject * args, PyObject * kwds)
-{
- char * kwlist[] = {"debugLevel", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &_rpmte_debug))
- return NULL;
-
- Py_RETURN_NONE;
-}
-
-static PyObject *
rpmte_TEType(rpmteObject * s)
{
return Py_BuildValue("i", rpmteType(s->te));
@@ -216,8 +205,6 @@ rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds)
}
static struct PyMethodDef rpmte_methods[] = {
- {"Debug", (PyCFunction)rpmte_Debug, METH_VARARGS|METH_KEYWORDS,
- NULL},
{"Type", (PyCFunction)rpmte_TEType, METH_NOARGS,
"te.Type() -> Type\n\
- Return element type (rpm.TR_ADDED | rpm.TR_REMOVED).\n" },
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index ba3e322cd..6d858ac24 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -18,9 +18,6 @@
#include "debug.h"
-extern int _rpmts_debug;
-
-
/** \ingroup python
* \name Class: Rpmts
* \class Rpmts
@@ -154,21 +151,6 @@ struct rpmtsCallbackType_s {
PyThreadState *_save;
};
-static PyObject *
-rpmts_Debug(rpmtsObject * s, PyObject * args, PyObject * kwds)
-{
- char * kwlist[] = {"debugLevel", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:Debug", kwlist,
- &_rpmts_debug))
- return NULL;
-
-if (_rpmts_debug < 0)
-fprintf(stderr, "*** rpmts_Debug(%p) ts %p\n", s, s->ts);
-
- Py_RETURN_NONE;
-}
-
RPM_GNUC_NORETURN
static void die(PyObject *cb)
{
@@ -208,9 +190,6 @@ rpmts_AddInstall(rpmtsObject * s, PyObject * args, PyObject * kwds)
}
}
-if (_rpmts_debug < 0 || (_rpmts_debug > 0))
-fprintf(stderr, "*** rpmts_AddInstall(%p,%p,%p,%s) ts %p\n", s, h, key, how, s->ts);
-
if (how && !rstreq(how, "u") && !rstreq(how, "i")) {
PyErr_SetString(PyExc_TypeError, "how argument must be \"u\" or \"i\"");
return NULL;
@@ -241,9 +220,6 @@ rpmts_AddErase(rpmtsObject * s, PyObject * args, PyObject * kwds)
Header h;
char * kwlist[] = {"name", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_AddErase(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:AddErase", kwlist, &o))
return NULL;
@@ -279,9 +255,6 @@ rpmts_SolveCallback(rpmts ts, rpmds ds, const void * data)
PyObject * args, * result;
int res = 1;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_SolveCallback(%p,%p,%p) \"%s\"\n", ts, ds, data, rpmdsDNEVR(ds));
-
if (cbInfo->tso == NULL) return res;
if (cbInfo->cb == Py_None) return res;
@@ -328,9 +301,6 @@ rpmts_Check(rpmtsObject * s, PyObject * args, PyObject * kwds)
xx = rpmtsSetSolveCallback(s->ts, rpmts_SolveCallback, (void *)&cbInfo);
}
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
-
cbInfo.tso = s;
cbInfo._save = PyEval_SaveThread();
@@ -406,9 +376,6 @@ rpmts_Order(rpmtsObject * s)
{
int rc;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Order(%p) ts %p\n", s, s->ts);
-
Py_BEGIN_ALLOW_THREADS
rc = rpmtsOrder(s->ts);
Py_END_ALLOW_THREADS
@@ -419,9 +386,6 @@ fprintf(stderr, "*** rpmts_Order(%p) ts %p\n", s, s->ts);
static PyObject *
rpmts_Clean(rpmtsObject * s)
{
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Clean(%p) ts %p\n", s, s->ts);
-
rpmtsClean(s->ts);
Py_RETURN_NONE;
@@ -432,9 +396,6 @@ rpmts_OpenDB(rpmtsObject * s)
{
int dbmode;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts);
-
dbmode = rpmtsGetDBMode(s->ts);
if (dbmode == -1)
dbmode = O_RDONLY;
@@ -447,9 +408,6 @@ rpmts_CloseDB(rpmtsObject * s)
{
int rc;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts);
-
rc = rpmtsCloseDB(s->ts);
rpmtsSetDBMode(s->ts, -1); /* XXX disable lazy opens */
@@ -461,9 +419,6 @@ rpmts_InitDB(rpmtsObject * s)
{
int rc;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_InitDB(%p) ts %p\n", s, s->ts);
-
rc = rpmtsInitDB(s->ts, O_RDONLY);
if (rc == 0)
rc = rpmtsCloseDB(s->ts);
@@ -476,9 +431,6 @@ rpmts_RebuildDB(rpmtsObject * s)
{
int rc;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_RebuildDB(%p) ts %p\n", s, s->ts);
-
Py_BEGIN_ALLOW_THREADS
rc = rpmtsRebuildDB(s->ts);
Py_END_ALLOW_THREADS
@@ -491,9 +443,6 @@ rpmts_VerifyDB(rpmtsObject * s)
{
int rc;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_VerifyDB(%p) ts %p\n", s, s->ts);
-
Py_BEGIN_ALLOW_THREADS
rc = rpmtsVerifyDB(s->ts);
Py_END_ALLOW_THREADS
@@ -519,9 +468,6 @@ rpmts_HdrFromFdno(rpmtsObject * s, PyObject * args, PyObject * kwds)
rpmrc = rpmReadPackageFile(s->ts, fd, "rpmts_HdrFromFdno", &h);
Fclose(fd);
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_HdrFromFdno(%p) ts %p rc %d\n", s, s->ts, rpmrc);
-
switch (rpmrc) {
case RPMRC_OK:
if (h)
@@ -558,9 +504,6 @@ rpmts_HdrCheck(rpmtsObject * s, PyObject * args, PyObject * kwds)
rpmRC rpmrc;
char * kwlist[] = {"headers", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_HdrCheck(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:HdrCheck", kwlist, &blob))
return NULL;
@@ -606,9 +549,6 @@ rpmts_SetVSFlags(rpmtsObject * s, PyObject * args, PyObject * kwds)
rpmVSFlags vsflags;
char * kwlist[] = {"flags", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_SetVSFlags(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:SetVSFlags", kwlist,
&vsflags))
return NULL;
@@ -631,9 +571,6 @@ rpmts_SetColor(rpmtsObject * s, PyObject * args, PyObject * kwds)
rpm_color_t tscolor;
char * kwlist[] = {"color", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_SetColor(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:Color", kwlist, &tscolor))
return NULL;
@@ -652,9 +589,6 @@ rpmts_PgpPrtPkts(rpmtsObject * s, PyObject * args, PyObject * kwds)
int rc;
char * kwlist[] = {"octets", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_PgpPrtPkts(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:PgpPrtPkts", kwlist, &blob))
return NULL;
@@ -682,9 +616,6 @@ rpmts_PgpImportPubkey(rpmtsObject * s, PyObject * args, PyObject * kwds)
int rc;
char * kwlist[] = {"pubkey", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_PgpImportPubkey(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:PgpImportPubkey",
kwlist, &blob))
return NULL;
@@ -711,9 +642,6 @@ rpmts_GetKeys(rpmtsObject * s)
int num, i;
PyObject *tuple;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_GetKeys(%p) ts %p\n", s, s->ts);
-
rpmtsGetKeys(s->ts, &data, &num);
if (data == NULL || num <= 0) {
data = _free(data);
@@ -779,20 +707,12 @@ rpmtsCallback(const void * hd, const rpmCallbackType what,
cbInfo->_save = PyEval_SaveThread();
fd = fdDup(fdno);
-if (_rpmts_debug)
-fprintf(stderr, "\t%p = fdDup(%d)\n", fd, fdno);
-
fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
return fd;
} else
if (what == RPMCALLBACK_INST_CLOSE_FILE) {
-if (_rpmts_debug)
-fprintf(stderr, "\tFclose(%p)\n", fd);
Fclose (fd);
- } else {
-if (_rpmts_debug)
-fprintf(stderr, "\t%llu:%llu key %p\n", (long long) amount, (long long) total, pkgKey);
}
Py_DECREF(result);
@@ -811,9 +731,6 @@ rpmts_SetFlags(rpmtsObject * s, PyObject * args, PyObject * kwds)
&transFlags))
return NULL;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_SetFlags(%p) ts %p transFlags %x\n", s, s->ts, transFlags);
-
/* XXX FIXME: value check on flags, or build pure python object
* for it, and require an object of that type */
@@ -831,9 +748,6 @@ rpmts_SetProbFilter(rpmtsObject * s, PyObject * args, PyObject * kwds)
&ignoreSet))
return NULL;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_SetProbFilter(%p) ts %p ignoreSet %x\n", s, s->ts, ignoreSet);
-
oignoreSet = s->ignoreSet;
s->ignoreSet = ignoreSet;
@@ -843,10 +757,6 @@ fprintf(stderr, "*** rpmts_SetProbFilter(%p) ts %p ignoreSet %x\n", s, s->ts, ig
static PyObject *
rpmts_Problems(rpmtsObject * s)
{
-
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Problems(%p) ts %p\n", s, s->ts);
-
return rpmps_Wrap( rpmtsProblems(s->ts) );
}
@@ -875,9 +785,6 @@ rpmts_Run(rpmtsObject * s, PyObject * args, PyObject * kwds)
(void) rpmtsSetNotifyCallback(s->ts, rpmtsCallback, (void *) &cbInfo);
}
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Run(%p) ts %p ignore %x\n", s, s->ts, s->ignoreSet);
-
rc = rpmtsRun(s->ts, NULL, s->ignoreSet);
ps = rpmtsProblems(s->ts);
@@ -920,9 +827,6 @@ rpmts_iternext(rpmtsObject * s)
PyObject * result = NULL;
rpmte te;
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_iternext(%p) ts %p tsi %p %d\n", s, s->ts, s->tsi, s->tsiFilter);
-
/* Reset iterator on 1st entry. */
if (s->tsi == NULL) {
s->tsi = rpmtsiInit(s->ts);
@@ -980,9 +884,6 @@ rpmts_Match(rpmtsObject * s, PyObject * args, PyObject * kwds)
rpmTag tag = RPMDBI_PACKAGES;
char * kwlist[] = {"tagNumber", "key", NULL};
-if (_rpmts_debug)
-fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:Match", kwlist,
&TagN, &Key))
return NULL;
@@ -1023,9 +924,6 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
}
static struct PyMethodDef rpmts_methods[] = {
- {"Debug", (PyCFunction)rpmts_Debug, METH_VARARGS|METH_KEYWORDS,
- NULL},
-
{"addInstall", (PyCFunction) rpmts_AddInstall, METH_VARARGS|METH_KEYWORDS,
NULL },
{"addErase", (PyCFunction) rpmts_AddErase, METH_VARARGS|METH_KEYWORDS,
@@ -1109,8 +1007,6 @@ static struct PyMethodDef rpmts_methods[] = {
static void rpmts_dealloc(rpmtsObject * s)
{
-if (_rpmts_debug)
-fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts));
s->ts = rpmtsFree(s->ts);
if (s->scriptFd) Fclose(s->scriptFd);
@@ -1150,8 +1046,6 @@ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v)
static void rpmts_free(rpmtsObject * s)
{
-if (_rpmts_debug)
-fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts));
s->ts = rpmtsFree(s->ts);
if (s->scriptFd)