Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579292 - sys-apps/portage: egencache --update-changelogs timestamp comparison is fragile
Summary: sys-apps/portage: egencache --update-changelogs timestamp comparison is fragile
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-04-08 03:00 UTC by Zac Medico
Modified: 2017-08-11 20:00 UTC (History)
0 users

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 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.