summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-12 12:04:54 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-12 12:04:54 -0700
commit9d3564ac4479ac6367cf5f12f936edd61a67b114 (patch)
treead5dfbf12ca4fe4295f83f7cd0ba61ac9c9d9ba8
parent5d76c94e173df56aafcc1a5a740c01ffc51f2f0b (diff)
downloadportage-9d3564ac4479ac6367cf5f12f936edd61a67b114.tar.gz
portage-9d3564ac4479ac6367cf5f12f936edd61a67b114.tar.bz2
portage-9d3564ac4479ac6367cf5f12f936edd61a67b114.zip
cache.sqlite: handle readonly morev2.2.0_alpha33
-rw-r--r--pym/portage/cache/sqlite.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/cache/sqlite.py b/pym/portage/cache/sqlite.py
index 4eb340bb0..fcc62ff94 100644
--- a/pym/portage/cache/sqlite.py
+++ b/pym/portage/cache/sqlite.py
@@ -78,7 +78,7 @@ class database(fs_template.FsBased):
database=_unicode_decode(self._dbpath), **connection_kwargs)
self._db_cursor = self._db_connection.cursor()
self._db_cursor.execute("PRAGMA encoding = %s" % self._db_escape_string("UTF-8"))
- if not self._ensure_access(self._dbpath):
+ if not self.readonly and not self._ensure_access(self._dbpath):
raise cache_errors.InitializationError(self.__class__, "can't ensure perms on %s" % self._dbpath)
self._db_init_cache_size(config["cache_bytes"])
self._db_init_synchronous(config["synchronous"])