Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638292 - sys-apps/portage: $PKGDIR/Packages is re-written with no changes when any MD5 digests are missing
Summary: sys-apps/portage: $PKGDIR/Packages is re-written with no changes when any MD5...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 637452
  Show dependency tree
 
Reported: 2017-11-21 05:29 UTC by Zac Medico
Modified: 2018-02-02 00:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2017-11-21 05:29:35 UTC
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.
Comment 1 Larry the Git Cow gentoo-dev 2017-11-21 19:27:54 UTC
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(-)}
Comment 2 Zac Medico gentoo-dev 2017-11-21 21:26:07 UTC
Released in portage-2.3.16.