diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-05-04 10:03:14 -0700 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-05-04 10:03:14 -0700 |
| commit | 0bec8751cd24d4308f5f5727b0197101619a70f2 (patch) | |
| tree | 9cce6bee1a6bd9772047ead44fb34d82696125b8 /python/cache.cc | |
| parent | 0165191e08c650bb81c06660845114cec3738dce (diff) | |
| parent | 8c17defbb7ef82f5791cf37973c9b26a367359ea (diff) | |
| download | python-apt-0bec8751cd24d4308f5f5727b0197101619a70f2.tar.gz | |
merged from the mvo branch
Diffstat (limited to 'python/cache.cc')
| -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); |
