commit:     2565d3a60315df2edff080b49547ec98ce24b595
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  1 23:50:14 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Sep  1 23:56:20 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2565d3a6

emaint binhost: force reindex in case of pkgdir-index-trusted

Bug: https://bugs.gentoo.org/688902
Fixes: fbbe0cfe2902 ("Add FEATURES=pkgdir-index-trusted")
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/emaint/modules/binhost/binhost.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/portage/emaint/modules/binhost/binhost.py 
b/lib/portage/emaint/modules/binhost/binhost.py
index 4d1d63601..cf9516112 100644
--- a/lib/portage/emaint/modules/binhost/binhost.py
+++ b/lib/portage/emaint/modules/binhost/binhost.py
@@ -66,6 +66,9 @@ class BinhostHandler(object):
        def check(self, **kwargs):
                onProgress = kwargs.get('onProgress', None)
                bintree = self._bintree
+               # Force reindex in case pkgdir-index-trusted is enabled.
+               bintree._populate_local(reindex=True)
+               bintree.populated = True
                _instance_key = bintree.dbapi._instance_key
                cpv_all = self._bintree.dbapi.cpv_all()
                cpv_all.sort()
@@ -99,6 +102,9 @@ class BinhostHandler(object):
        def fix(self,  **kwargs):
                onProgress = kwargs.get('onProgress', None)
                bintree = self._bintree
+               # Force reindex in case pkgdir-index-trusted is enabled.
+               bintree._populate_local(reindex=True)
+               bintree.populated = True
                _instance_key = bintree.dbapi._instance_key
                cpv_all = self._bintree.dbapi.cpv_all()
                cpv_all.sort()

Reply via email to