summaryrefslogtreecommitdiffstats
path: root/pym/cache/flat_hash.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-22 23:26:48 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-22 23:26:48 +0000
commitb7c4d023faa00a6c93658550567b8fce2a3c6457 (patch)
treed7b8d3c9efa6d8cc2728991d7128771aa2545447 /pym/cache/flat_hash.py
parent3f1c8f55f56b39955f0ba4c927be2d780e9f3a4a (diff)
downloadportage-b7c4d023faa00a6c93658550567b8fce2a3c6457.tar.gz
portage-b7c4d023faa00a6c93658550567b8fce2a3c6457.tar.bz2
portage-b7c4d023faa00a6c93658550567b8fce2a3c6457.zip
When an unprivileged user runs portage (not in the portage group), use metadata_overlay together with a volatile in-memory cache module in order to implement cache writes. This allows, for example, a user who's not in the portage group to run `ebuild foo.ebuild digest` (issue reported by Charlie Shepherd <masterdriverz@gentoo.org>).
svn path=/main/trunk/; revision=5354
Diffstat (limited to 'pym/cache/flat_hash.py')
-rw-r--r--pym/cache/flat_hash.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py
index a8adb2205..48e8a175e 100644
--- a/pym/cache/flat_hash.py
+++ b/pym/cache/flat_hash.py
@@ -17,7 +17,7 @@ class database(fs_template.FsBased):
self.location = os.path.join(self.location,
self.label.lstrip(os.path.sep).rstrip(os.path.sep))
- if not os.path.exists(self.location):
+ if not self.readonly and not os.path.exists(self.location):
self._ensure_dirs()
def __getitem__(self, cpv):