summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <devel@glatzor.de>2012-04-16 19:09:34 +0200
committerSebastian Heinlein <devel@glatzor.de>2012-04-16 19:09:34 +0200
commitb0940220822459891fcc593f77171e7ee2a6cf12 (patch)
treec0e07be4404cf80497e9a71f890810708e342c29
parent0f9e6f8c5d88f83b1d9498b9d9ad3d90b1bc08f5 (diff)
downloadpython-apt-b0940220822459891fcc593f77171e7ee2a6cf12.tar.gz
Fix: Initialize the depcache on apt.cache.Cache.open() (fixes LP: #659438)
If there are packages in the reqreinst state cache operations won't fail anymore with the "cannot locate file for package x" error message. During the 0.8 API rewrite of apt_pkg.GetDepCache() this functionality was lost.
-rw-r--r--apt/cache.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 86a788bb..aaa6595a 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -144,6 +144,7 @@ class Cache(object):
self._cache = apt_pkg.Cache(progress)
self._depcache = apt_pkg.DepCache(self._cache)
+ self._depcache.init(progress)
self._records = apt_pkg.PackageRecords(self._cache)
self._list = apt_pkg.SourceList()
self._list.read_main_list()