commit:     694419fc11af6cbda4944b21632acec9c641d1c3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 18:37:33 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 18:47:29 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=694419fc

emaint binhost: use _populate_local instead of _populate (bug 638320)

Fixes: 8267445cf2f8 ("binarytree.populate: avoid lock when possible (bug 
607872)")
Bug: https://bugs.gentoo.org/638320

 pym/portage/dbapi/bintree.py                  | 2 +-
 pym/portage/emaint/modules/binhost/binhost.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index ffac8d216..f4e8a1c66 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -532,7 +532,6 @@ class binarytree(object):
                # prior to performing package moves since it only wants to
                # operate on local packages (getbinpkgs=0).
                self._remotepkgs = None
-               self.dbapi.clear()
 
                self._populating = True
                try:
@@ -568,6 +567,7 @@ class binarytree(object):
                self.populated = True
 
        def _populate_local(self):
+               self.dbapi.clear()
                _instance_key = self.dbapi._instance_key
                if True:
                        pkg_paths = {}

diff --git a/pym/portage/emaint/modules/binhost/binhost.py 
b/pym/portage/emaint/modules/binhost/binhost.py
index ebcc9054f..f18878c7c 100644
--- a/pym/portage/emaint/modules/binhost/binhost.py
+++ b/pym/portage/emaint/modules/binhost/binhost.py
@@ -123,7 +123,7 @@ class BinhostHandler(object):
                                self._pkgindex_file, wantnewlockfile=1)
                        try:
                                # Repopulate with lock held.
-                               bintree._populate()
+                               bintree._populate_local()
                                cpv_all = self._bintree.dbapi.cpv_all()
                                cpv_all.sort()
 

Reply via email to