Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/
Date: Mon, 16 May 2011 00:22:53
Message-Id: 2160fefc6b7e670906e5e76188daccf0e6c9d659.zmedico@gentoo
1 commit: 2160fefc6b7e670906e5e76188daccf0e6c9d659
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 15 23:28:32 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun May 15 23:28:32 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2160fefc
7
8 Revert "counter_tick_core: don't lock if parallel-install"
9
10 This reverts commit 405ad9eed65393205ec28af8772f7ea45ce0371e.
11 The root problem is fixed by commit
12 8380ec9d7590a47b912e0d1e1db2ebb6049b903b.
13
14 ---
15 pym/portage/dbapi/vartree.py | 16 ++--------------
16 1 files changed, 2 insertions(+), 14 deletions(-)
17
18 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
19 index 0f8eede..4d7e6b8 100644
20 --- a/pym/portage/dbapi/vartree.py
21 +++ b/pym/portage/dbapi/vartree.py
22 @@ -815,18 +815,7 @@ class vardbapi(dbapi):
23 """
24 myroot = None
25 mycpv = None
26 - locked_vdb = False
27 - if "parallel-install" not in self.settings.features:
28 - # If parallel-install is enabled, it's unsafe to
29 - # lock the vdb here because it can deadlock the
30 - # Scheduler by preventing it from servicing its
31 - # poll loop which is essential for at least a
32 - # couple of reasons:
33 - # 1) releasing locks held by the scheduler
34 - # 2) handling output of subprocesses so that they
35 - # don't deadlock due to blocking on stdout
36 - self.lock()
37 - locked_vdb = True
38 + self.lock()
39 try:
40 counter = self.get_counter_tick_core() - 1
41 if self._cached_counter != counter:
42 @@ -840,8 +829,7 @@ class vardbapi(dbapi):
43 write_atomic(self._counter_path, str(counter))
44 self._cached_counter = counter
45 finally:
46 - if locked_vdb:
47 - self.unlock()
48 + self.unlock()
49
50 return counter