summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/cache.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/cache.cc b/python/cache.cc
index 52ce32e3..c51bd4af 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -197,11 +197,11 @@ static PyObject *PkgCacheOpen(PyObject *Self,PyObject *Args)
return HandleErrors();
}
+ //std::cout << "new cache is " << (pkgCache*)(*Cache) << std::endl;
+
// 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);
@@ -403,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);