Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 579292

Summary: sys-apps/portage: egencache --update-changelogs timestamp comparison is fragile
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 573774    

Description Zac Medico gentoo-dev 2016-04-08 03:00:55 UTC
The ChangeLog timestamp comparison here is too fragile:

https://gitweb.gentoo.org/proj/portage.git/tree/bin/egencache?h=v2.2.28#n779

We should use os.utime() to synchronize the ChangeLog mtime with the commit time, and then regenerate the ChangeLog if its timestamp is not exactly identical to the last commit time. Relying on >= comparison introduces unnecessary fragility, since commit times come from committer's clocks which are not necessarily in sync.
Comment 1 Zac Medico gentoo-dev 2016-04-08 05:54:36 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_579292

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/431da9c1a6a26954967396ed0570e413
Comment 3 Zac Medico gentoo-dev 2017-08-11 20:00:29 UTC
Fixed in 2.3.0.