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

Bug 564222

Summary: sys-apps/portage: make vdb_metadata.pickle validation handle truncated mtime (useful for livecd squashfs)
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: zerochaos
Priority: Normal Keywords: InVCS
Version: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Zac Medico gentoo-dev 2015-10-26 22:40:51 UTC
Currently, if emerge is invoked on a squashfs based livecd, it will spend a lot of time to regenerate the entire vdb_metadata.pickle. This is due to truncation of timestamps to 1s precision. If the vdb_metadata.pickle code would detect this truncation, then it could treat the cache as valid, and avoid regenerating it.
Comment 1 Zac Medico gentoo-dev 2015-10-26 23:34:04 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_564222
Comment 2 Zac Medico gentoo-dev 2015-10-27 04:10:03 UTC
The first version of the patch had incorrect logic. It's fixed now. Here's a link to the current patch:

https://github.com/zmedico/portage/commit/ca8505cf52354c0ac3b1feb1900dc034658072b0.patch
Comment 3 Zac Medico gentoo-dev 2015-10-28 02:00:40 UTC
I've posted the patch for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/3c7fa054f5af9d8399c03e08d049f6e0
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2015-10-28 03:26:43 UTC
I gave report on irc but I'll add it here as well.  This patch speed up the initial run of emerge on my livecd by EIGHT minutes.  Please accept it.
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2015-10-28 03:26:57 UTC
I gave report on irc but I'll add it here as well.  This patch speed up the initial run of emerge on my livecd by EIGHT minutes.  Please accept it.
Comment 7 Zac Medico gentoo-dev 2016-03-14 02:52:37 UTC
Fixed in 2.2.24.