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/, pym/portage/emaint/modules/binhost/
Date: Tue, 21 Nov 2017 18:48:11
Message-Id: 1511290049.694419fc11af6cbda4944b21632acec9c641d1c3.zmedico@gentoo
1 commit: 694419fc11af6cbda4944b21632acec9c641d1c3
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 21 18:37:33 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 21 18:47:29 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=694419fc
7
8 emaint binhost: use _populate_local instead of _populate (bug 638320)
9
10 Fixes: 8267445cf2f8 ("binarytree.populate: avoid lock when possible (bug 607872)")
11 Bug: https://bugs.gentoo.org/638320
12
13 pym/portage/dbapi/bintree.py | 2 +-
14 pym/portage/emaint/modules/binhost/binhost.py | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
18 index ffac8d216..f4e8a1c66 100644
19 --- a/pym/portage/dbapi/bintree.py
20 +++ b/pym/portage/dbapi/bintree.py
21 @@ -532,7 +532,6 @@ class binarytree(object):
22 # prior to performing package moves since it only wants to
23 # operate on local packages (getbinpkgs=0).
24 self._remotepkgs = None
25 - self.dbapi.clear()
26
27 self._populating = True
28 try:
29 @@ -568,6 +567,7 @@ class binarytree(object):
30 self.populated = True
31
32 def _populate_local(self):
33 + self.dbapi.clear()
34 _instance_key = self.dbapi._instance_key
35 if True:
36 pkg_paths = {}
37
38 diff --git a/pym/portage/emaint/modules/binhost/binhost.py b/pym/portage/emaint/modules/binhost/binhost.py
39 index ebcc9054f..f18878c7c 100644
40 --- a/pym/portage/emaint/modules/binhost/binhost.py
41 +++ b/pym/portage/emaint/modules/binhost/binhost.py
42 @@ -123,7 +123,7 @@ class BinhostHandler(object):
43 self._pkgindex_file, wantnewlockfile=1)
44 try:
45 # Repopulate with lock held.
46 - bintree._populate()
47 + bintree._populate_local()
48 cpv_all = self._bintree.dbapi.cpv_all()
49 cpv_all.sort()