From 33dd13058d468772153e3182c7d8b126f1e0f6ba Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 22 Dec 2010 10:50:50 +0100 Subject: * python/depcache.cc: - when using the actiongroup as a contextmanager incref/decref on enter and leave. this should fix the instablity issues that aptdaemon runs into (LP: #691134) --- debian/changelog | 4 ++++ python/depcache.cc | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9740fa4e..61b9864b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,10 @@ python-apt (0.7.100.1) UNRELEASED; urgency=low * apt/debfile.py, tests/test_debfile.py: - strip "./" from _get_content and add tests, this fixes a control file extraction bug in gdebi + * python/depcache.cc: + - when using the actiongroup as a contextmanager incref/decref + on enter and leave. this should fix the instablity issues + that aptdaemon runs into (LP: #691134) -- Michael Vogt Tue, 07 Dec 2010 13:41:07 +0100 diff --git a/python/depcache.cc b/python/depcache.cc index 014ad7ae..a84eb615 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -989,7 +989,8 @@ static const char *actiongroup__enter__doc = static PyObject *PkgActionGroupEnter(PyObject *Self,PyObject *Args) { if (PyArg_ParseTuple(Args,"") == 0) return 0; - return Self; + Py_INCREF(Self); + return Self; } static const char *actiongroup__exit__doc = @@ -999,6 +1000,7 @@ static PyObject *PkgActionGroupExit(PyObject *Self,PyObject *Args) { pkgDepCache::ActionGroup *ag = GetCpp(Self); if (ag != NULL) ag->release(); + Py_DECREF(Self); Py_RETURN_FALSE; } -- cgit v1.2.3