summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-21 20:46:24 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-21 20:46:24 +0200
commit6842933fb0b51aaa6fdc66e17b4645312876d0c9 (patch)
treebda4d852dc78c19431f6a76e3e813fe5d1c272b9
parent99f4e7d2ae98c2f5297d681f1ee89b845b577be0 (diff)
downloadpython-apt-6842933fb0b51aaa6fdc66e17b4645312876d0c9.tar.gz
apt/cache.py: Correctly handle rootdir on second and later invocations of open() (LP: #320665).
-rw-r--r--apt/cache.py4
-rw-r--r--debian/changelog2
2 files changed, 6 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 737061ad..414bd982 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -80,6 +80,10 @@ class Cache(object):
if progress is None:
progress = apt.progress.OpProgress()
self._run_callbacks("cache_pre_open")
+
+ # Make changes to Dir::State::Status work again, by reinitialising
+ # the system.
+ apt_pkg.init_system()
self._cache = apt_pkg.Cache(progress)
self._depcache = apt_pkg.DepCache(self._cache)
self._records = apt_pkg.PackageRecords(self._cache)
diff --git a/debian/changelog b/debian/changelog
index 97b49021..4fb6b0de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ python-apt (0.7.92) UNRELEASED; urgency=low
* Add support for Enhances as a dependency type (Closes: #416247)
* apt/cache.py: Provide broken_count, delete_count, install_count, keep_count
properties (Closes: #532338)
+ * apt/cache.py: Correctly handle rootdir on second and later invocations of
+ open() (LP: #320665).
[ Sebastian Heinlein ]
* apt/progress.py: Extract the package name from the status message