summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-12-22 11:00:19 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-12-22 11:00:19 +0100
commitcae9a2b68b868558828331bfda65d32d9d942962 (patch)
treebe548447cb2c386c1ba41edadc324428c8b80673
parent06720135e8a408369cbb74e7d1fa7e554dd36067 (diff)
parent33dd13058d468772153e3182c7d8b126f1e0f6ba (diff)
downloadpython-apt-cae9a2b68b868558828331bfda65d32d9d942962.tar.gz
merged from the mvo branch
-rw-r--r--debian/changelog9
-rw-r--r--python/depcache.cc4
2 files changed, 12 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index c1ab2f0e..f6956175 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+python-apt (0.7.100.1ubuntu2) natty; urgency=low
+
+ * 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 <michael.vogt@ubuntu.com> Wed, 22 Dec 2010 10:52:50 +0100
+
python-apt (0.7.100.1ubuntu1) natty; urgency=low
* merged from debian
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<pkgDepCache::ActionGroup*>(Self);
if (ag != NULL)
ag->release();
+ Py_DECREF(Self);
Py_RETURN_FALSE;
}