summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-30 14:29:15 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-30 14:29:15 +0200
commit85707b8b52eba15c2ed8328e4f55f794bd242a71 (patch)
tree83d7b523c07ab312a56cd48360629fda580c6118
parenta33de8e29160276e3dbd6a11812c7ec7dd532997 (diff)
downloadpython-apt-85707b8b52eba15c2ed8328e4f55f794bd242a71.tar.gz
* apt/cache.py: Call InitSystem() if rootdir is not None (LP: #320665).
-rw-r--r--apt/cache.py3
-rw-r--r--debian/changelog3
2 files changed, 6 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 94a77fd8..efa8afb3 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -63,6 +63,9 @@ class Cache(object):
# create required dirs/files when run with special rootdir
# automatically
self._check_and_create_required_dirs(rootdir)
+ # Call InitSystem so the change to Dir::State::Status is actually
+ # recognized (LP: #320665)
+ apt_pkg.InitSystem()
self.open(progress)
def _check_and_create_required_dirs(self, rootdir):
diff --git a/debian/changelog b/debian/changelog
index b12c156e..66f2c052 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ python-apt (0.7.11.2) unstable; urgency=low
* debian/control:
- Only recommend libjs-jquery (Closes: #527543)
- Build-depend on libapt-pkg-dev (>= 0.7.22~)
+ * apt/cache.py:
+ - Correctly handle rootdir on second and later invocations of
+ open(), by calling InitSystem again. (LP: #320665).
[ Stefano Zacchiroli ]
* debian/python-apt.doc-base: register the documentation with the