summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--python/cache.cc4
2 files changed, 11 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index c1b12cc8..63f72fa5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-apt (0.8.5) UNRELEASED; urgency=low
+
+ * python/cache.cc:
+ - ensure that pkgApplyStatus is called when the cache is opened
+ (thanks to Sebastian Heinlein for finding this bug), LP: #659438
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 17 Apr 2012 14:09:24 +0200
+
python-apt (0.8.4) unstable; urgency=low
[ Michael Vogt ]
diff --git a/python/cache.cc b/python/cache.cc
index 191e2204..52ce32e3 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -197,12 +197,14 @@ static PyObject *PkgCacheOpen(PyObject *Self,PyObject *Args)
return HandleErrors();
}
+ // ensure that the states are correct (LP: #659438)
+ pkgApplyStatus(*Cache);
+
//std::cout << "new cache is " << (pkgCache*)(*Cache) << std::endl;
// update the cache pointer after the cache was rebuild
((CppPyObject<pkgCache*> *)Self)->Object = (pkgCache*)(*Cache);
-
Py_INCREF(Py_None);
return HandleErrors(Py_None);
}