diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-22 23:26:48 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-22 23:26:48 +0000 |
commit | b7c4d023faa00a6c93658550567b8fce2a3c6457 (patch) | |
tree | d7b8d3c9efa6d8cc2728991d7128771aa2545447 /pym/cache/metadata_overlay.py | |
parent | 3f1c8f55f56b39955f0ba4c927be2d780e9f3a4a (diff) | |
download | portage-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/metadata_overlay.py')
-rw-r--r-- | pym/cache/metadata_overlay.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/cache/metadata_overlay.py b/pym/cache/metadata_overlay.py index c4d18c173..b829ea579 100644 --- a/pym/cache/metadata_overlay.py +++ b/pym/cache/metadata_overlay.py @@ -19,7 +19,10 @@ class database(template.database): **config): super(database, self).__init__(location, label, auxdbkeys) self.db_rw = db_rw(location, label, auxdbkeys, **config) - self.db_ro = db_ro(label,"metadata/cache",auxdbkeys) + self.commit = self.db_rw.commit + ro_config = config.copy() + ro_config["readonly"] = True + self.db_ro = db_ro(label, "metadata/cache", auxdbkeys, **ro_config) def __getitem__(self, cpv): """funnel whiteout validation through here, since value needs to be fetched""" |