From: "Rick \"Zero_Chaos\" Farina" <zerochaos@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] vardbapi.aux_get: treat cache as valid if mtime is truncated (bug 564222)
Date: Tue, 27 Oct 2015 23:28:06 -0400 [thread overview]
Message-ID: <563040C6.1020609@gentoo.org> (raw)
In-Reply-To: <1445997123-5192-1-git-send-email-zmedico@gentoo.org>
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]
>
next prev parent reply other threads:[~2015-10-28 3:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Rick "Zero_Chaos" Farina [this message]
2015-10-28 11:44 ` Alexander Berntsen
2015-10-28 16:31 ` Zac Medico
2015-10-29 9:30 ` Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563040C6.1020609@gentoo.org \
--to=zerochaos@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox