When testing changes for bug 636798, I noticed that binarytree.populate() always re-writes $PKGDIR/Packages if any MD5 digests are missing. The problem arises due to this code, where MD5 is part of the self._pkgindex_keys set: > if not self._pkgindex_keys.difference(d): > match = d > break The problem is easily corrected by running `emaint --fix binhost` to generate the missing MD5 digests, but the code should really be fixed to avoid the unnecessary re-writes.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=ca300d4fccffb8cd3d0d12f60c7c8c368f049258 commit ca300d4fccffb8cd3d0d12f60c7c8c368f049258 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-11-21 19:22:21 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-11-21 19:27:17 +0000 binarytree.populate: avoid unnecessary index re-write (bug 638292) Exclude hashes from the minimum_keys, so that the Packages index will not be needlessly re-written due to missing digests. Bug: https://bugs.gentoo.org/638292 pym/portage/dbapi/bintree.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)}
Released in portage-2.3.16.