summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/cache.py5
-rw-r--r--debian/changelog9
2 files changed, 13 insertions, 1 deletions
diff --git a/apt/cache.py b/apt/cache.py
index a92bd5be..384afe31 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -41,8 +41,11 @@ class Cache(object):
dictionary
"""
- def __init__(self, progress=None, rootdir=None):
+ def __init__(self, progress=None, rootdir=None, memonly=False):
self._callbacks = {}
+ if memonly:
+ # force apt to build its caches in memory
+ apt_pkg.Config.Set("Dir::Cache::pkgcache","")
if rootdir:
apt_pkg.Config.Set("Dir", rootdir)
apt_pkg.Config.Set("Dir::State::status", rootdir + "/var/lib/dpkg/status")
diff --git a/debian/changelog b/debian/changelog
index 68a7627f..db1211ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+python-apt (0.7.6) unstable; urgency=low
+
+ * apt/cache.py:
+ - add "memonly" option to apt.Cache() to force python-apt to
+ not touch the pkgcache.bin file (this works around a possible
+ race condition in the pkgcache.bin handling)
+
+ --
+
python-apt (0.7.5) unstable; urgency=low
* use the new ListUpdate() code