summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-22 21:26:37 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-22 21:26:37 +0000
commit975e4544a340d267b6e00fc501891dfdc273e70d (patch)
treea0a69f9858225fabdc5ce97ecf4d490542ae21c5
parent825444337b4a8d61b94eda8923851e31e6389bc1 (diff)
downloadportage-975e4544a340d267b6e00fc501891dfdc273e70d.tar.gz
portage-975e4544a340d267b6e00fc501891dfdc273e70d.tar.bz2
portage-975e4544a340d267b6e00fc501891dfdc273e70d.zip
Don't use LazyLoad for cache pulls because it causes a race condition.
svn path=/main/trunk/; revision=4503
-rw-r--r--pym/cache/sqlite.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/pym/cache/sqlite.py b/pym/cache/sqlite.py
index 40b0b9a9e..571eff39b 100644
--- a/pym/cache/sqlite.py
+++ b/pym/cache/sqlite.py
@@ -4,8 +4,7 @@
from cache import fs_template
from cache import cache_errors
-import errno, os, stat
-from cache.mappings import LazyLoad, ProtectedDict
+import os
from cache.template import reconstruct_eclasses
from portage_util import writemsg, apply_secpass_permissions
from portage_data import portage_gid
@@ -138,15 +137,6 @@ class database(fs_template.FsBased):
raise cache_errors.InitializationError(self.__class__,"actual synchronous = "+actual_synchronous+" does does not match requested value of "+synchronous)
def __getitem__(self, cpv):
- if not self.has_key(cpv):
- raise KeyError(cpv)
- def curry(*args):
- def callit(*args2):
- return args[0](*args[1:]+args2)
- return callit
- return ProtectedDict(LazyLoad(curry(self._pull, cpv)))
-
- def _pull(self, cpv):
cursor = self._db_cursor
cursor.execute("select * from %s where %s=%s" % \
(self._db_table["packages"]["table_name"],