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 16:31 99%   ` Zac Medico
  0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2015-10-28 16:31 UTC (permalink / raw
  To: gentoo-portage-dev

On 10/28/2015 04:44 AM, Alexander Berntsen wrote:
> Sheesh. That expression barely fits in a tweet. ;) Please just use
> intermediate statements or an if or something. Otherwise LGTM.

I've split it with an if, and also eliminated a redundant comparison
since long(cache_mtime) == mydir_stat.st_mtime implies that
mydir_stat.st_mtime == mydir_stat[stat.ST_MTIME], so here's what I've
pushed:

	if cache_mtime == mydir_stat.st_mtime:
		cache_valid = True

	# Handle truncated mtime in order to avoid cache
	# invalidation for livecd squashfs (bug 564222).
	elif long(cache_mtime) == mydir_stat.st_mtime:
		cache_valid = True

-- 
Thanks,
Zac


^ 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 11:44     ` Alexander Berntsen
2015-10-28 16:31 99%   ` Zac Medico

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