summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-14 21:29:48 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-14 21:29:48 -0700
commit521f0739caae714edaebede89b7143c26330804b (patch)
tree569b58e12b1cb5679d9bb13793694cc6e44b0e98 /pym
parent03d2647d5c8d74088b29283598f8c4a0fef5db96 (diff)
downloadportage-521f0739caae714edaebede89b7143c26330804b.tar.gz
portage-521f0739caae714edaebede89b7143c26330804b.tar.bz2
portage-521f0739caae714edaebede89b7143c26330804b.zip
Revert "counter_tick_core: don't lock if parallel-install"
This reverts commit 461564ae94ff936918eeaa18493bc1da3846796f. Disabling the lock here doesn't really make sense, and I'm still triggering EDEADLK is some other places.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 5db267d53..40f0cfb0f 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -815,15 +815,7 @@ class vardbapi(dbapi):
"""
myroot = None
mycpv = None
- locked_vdb = False
- if "parallel-install" not in self.settings.features:
- # If parallel-install is enabled, it's unsafe to
- # lock the vdb here since the portage.locks module
- # does not behave as desired if we try to lock the
- # same file multiple times concurrently from the
- # same process.
- self.lock()
- locked_vdb = True
+ self.lock()
try:
counter = self.get_counter_tick_core() - 1
if self._cached_counter != counter:
@@ -837,8 +829,7 @@ class vardbapi(dbapi):
write_atomic(self._counter_path, str(counter))
self._cached_counter = counter
finally:
- if locked_vdb:
- self.unlock()
+ self.unlock()
return counter