diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/cache.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/cache.cc b/python/cache.cc index 191e2204..c51bd4af 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -198,11 +198,13 @@ static PyObject *PkgCacheOpen(PyObject *Self,PyObject *Args) } //std::cout << "new cache is " << (pkgCache*)(*Cache) << std::endl; + + // ensure that the states are correct (LP: #659438) + pkgApplyStatus(*Cache); // update the cache pointer after the cache was rebuild ((CppPyObject<pkgCache*> *)Self)->Object = (pkgCache*)(*Cache); - Py_INCREF(Py_None); return HandleErrors(Py_None); } @@ -401,6 +403,9 @@ static PyObject *PkgCacheNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) return HandleErrors(); } + // ensure that the states are correct (LP: #659438) + pkgApplyStatus(*Cache); + CppPyObject<pkgCacheFile*> *CacheFileObj = CppPyObject_NEW<pkgCacheFile*>(0,&PyCacheFile_Type, Cache); |
