summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-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(