summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-06-15 09:02:21 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-06-15 09:02:21 +0200
commita7d7e6f5068d7aa9d20b8e52b80b05290776ea62 (patch)
treedd25798222c18bdc04de186cecb2b38435bc3305
parent3b12e19d8a19ae319646cc2a97c36e92cf65a1d5 (diff)
parent473031d5c8273643592d2f269fd532afb560303c (diff)
downloadpython-apt-a7d7e6f5068d7aa9d20b8e52b80b05290776ea62.tar.gz
* apt/cache.py:
- applied otavios patch to suppport alternatives rootdirs
-rw-r--r--apt/cache.py8
-rw-r--r--debian/changelog6
2 files changed, 12 insertions, 2 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 01034cf9..690510e3 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -31,10 +31,14 @@ class Cache(object):
dictionary
"""
- def __init__(self, progress=None):
+ def __init__(self, progress=None, rootdir=None):
self._callbacks = {}
self.open(progress)
+ if rootdir:
+ apt_pkg.Config.Set("Dir", rootdir)
+ apt_pkg.Config.Set("Dir::State::status", rootdir + "/var/lib/dpkg/status")
+
def _runCallbacks(self, name):
""" internal helper to run a callback """
if self._callbacks.has_key(name):
@@ -218,7 +222,7 @@ class Cache(object):
def connect(self, name, callback):
""" connect to a signal, currently only used for
- cache_{post,pre}_changed """
+ cache_{post,pre}_{changed,open} """
if not self._callbacks.has_key(name):
self._callbacks[name] = []
self._callbacks[name].append(callback)
diff --git a/debian/changelog b/debian/changelog
index a1a9858e..287605e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
python-apt (0.6.18) unstable; urgency=low
+ [ Michael Vogt ]
* doc/examples/print_uris.py:
- added a example to show how the indexfile.ArchiveURI() can be used
with binary packages
+ [ Otavio Salvador ]
+ * apt/cache.py:
+ - fix commit doc string to also cite the open related callbacks
+ - allow change of rootdir for APT database loading
+
--
python-apt (0.6.17) unstable; urgency=low