public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-portage-dev] [PATCH] vardbapi.aux_get: treat cache as valid if mtime is truncated (bug 564222)
  @ 2015-10-28  3:28 99% ` Rick "Zero_Chaos" Farina
  0 siblings, 0 replies; 1+ results
From: Rick "Zero_Chaos" Farina @ 2015-10-28  3:28 UTC (permalink / raw
  To: gentoo-portage-dev

This speeds up initial emerge run on my livecd by eight minutes.  Please
accept.

Thanks,
Zero

On 10/27/2015 09:52 PM, Zac Medico wrote:
> X-Gentoo-Bug: 564222
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564222
> ---
>  pym/portage/dbapi/vartree.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
> index 5ba8d9d..bac9837 100644
> --- a/pym/portage/dbapi/vartree.py
> +++ b/pym/portage/dbapi/vartree.py
> @@ -728,7 +728,11 @@ class vardbapi(dbapi):
>  		if pkg_data:
>  			cache_mtime, metadata = pkg_data
>  			if isinstance(cache_mtime, float):
> -				cache_valid = cache_mtime == mydir_stat.st_mtime
> +				# Handle truncated mtime in order to avoid cache
> +				# invalidation for livecd squashfs (bug 564222).
> +				cache_valid = cache_mtime == mydir_stat.st_mtime or (
> +					mydir_stat.st_mtime == mydir_stat[stat.ST_MTIME]
> +					and long(cache_mtime) == mydir_stat[stat.ST_MTIME])
>  			else:
>  				# Cache may contain integer mtime.
>  				cache_valid = cache_mtime == mydir_stat[stat.ST_MTIME]
> 



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-10-28  1:52     [gentoo-portage-dev] [PATCH] vardbapi.aux_get: treat cache as valid if mtime is truncated (bug 564222) Zac Medico
2015-10-28  3:28 99% ` Rick "Zero_Chaos" Farina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox