summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorBen Finney <ben+debian@benfinney.id.au>2008-06-21 01:11:59 +1000
committerBen Finney <ben+debian@benfinney.id.au>2008-06-21 01:11:59 +1000
commit535fdf276e94c99ec812aa66cb2a95a29a0c6d48 (patch)
treed582c702f4086d7275da3e42645999f93f294b77 /apt/cache.py
parentf264f62b7602f960bc35f3f68b1ed14c61bbfdd5 (diff)
parentdf08cc2180c01039428effeead8a004552d5dd36 (diff)
downloadpython-apt-535fdf276e94c99ec812aa66cb2a95a29a0c6d48.tar.gz
Merge from python-apt.debian-sid/.
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 a43bd5d7..36e3df8e 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -47,8 +47,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(