diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-04-17 21:17:10 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-04-17 21:17:10 +0200 |
| commit | 1e7324c4780beef16a4c68d1c979e08dedbc9637 (patch) | |
| tree | 5db22cd9fcd0546383550eae792c81f84a1f2d9c /python | |
| parent | 72b1f8e86e203df1d8bfef41c71d228ee21e9d99 (diff) | |
| parent | 89e3cd4d1141fea8ecb5b8828cde622c9bf12649 (diff) | |
| download | python-apt-1e7324c4780beef16a4c68d1c979e08dedbc9637.tar.gz | |
merged lp:~aptdaemon-developers/python-apt/fix-cannot-locate-file with a slighly different fix
Diffstat (limited to 'python')
| -rw-r--r-- | python/cache.cc | 7 |
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); |
