From b0940220822459891fcc593f77171e7ee2a6cf12 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 16 Apr 2012 19:09:34 +0200 Subject: 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. --- apt/cache.py | 1 + 1 file changed, 1 insertion(+) 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() -- cgit v1.2.3