summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authoregon <egon@debian-vm>2008-06-18 14:47:09 +0200
committeregon <egon@debian-vm>2008-06-18 14:47:09 +0200
commitdf08cc2180c01039428effeead8a004552d5dd36 (patch)
tree8f7371bbdbb2e29a11c14c9b06bd574dc7a5a176 /apt/cache.py
parent44faadf294230dc6384b309b06089520d562f199 (diff)
parent58322f187bef63ef6c6768cb055401401623b64a (diff)
downloadpython-apt-df08cc2180c01039428effeead8a004552d5dd36.tar.gz
merged from mvo branch
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py5
1 files changed, 4 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")