From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: "guix pull" expiry channels
Date: Wed, 16 Jun 2021 07:33:23 +0200 [thread overview]
Message-ID: <867diujrvg.fsf@gmail.com> (raw)
In-Reply-To: <87y2bg3x5q.fsf@gnu.org>
Hi,
On Fri, 11 Jun 2021 at 23:32, Ludovic Courtès <ludo@gnu.org> wrote:
> The code in (guix git) determines expiration based on the mtime of
> sub-directories in ~/.cache/guix/checkouts. But that’s bogus, no?
>
> Yes, and the Internet confirms: a directory’s mtime is only changed when
> a file inside it is renamed, added, or deleted.) Oops! So it would
> depend on how frequently you pull, and perhaps on the file system you
> use, go figure.
Hehe! :-)
> diff --git a/guix/git.scm b/guix/git.scm
> index 57fa2ca1ee..9c6f326c36 100644
> --- a/guix/git.scm
> +++ b/guix/git.scm
> @@ -424,6 +424,14 @@ it unchanged."
> ;; REPOSITORY as soon as possible.
> (repository-close! repository)
>
> + ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it.
> + (match (gettimeofday)
> + ((seconds . microseconds)
> + (let ((nanoseconds (* 1000 microseconds)))
> + (utime cache-directory
> + seconds seconds
> + nanoseconds nanoseconds))))
> +
> ;; When CACHE-DIRECTORY is a sub-directory of the default cache
> ;; directory, remove expired checkouts that are next to it.
> (let ((parent (dirname cache-directory)))
LGTM.
Thanks for the quick fix. :-)
Cheers,
simon
prev parent reply other threads:[~2021-06-16 5:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 12:51 "guix pull" expiry channels zimoun
2021-06-09 19:26 ` Pierre Neidhardt
2021-06-10 8:48 ` zimoun
2021-06-10 9:28 ` Pierre Neidhardt
2021-06-11 21:10 ` Ludovic Courtès
2021-06-11 21:32 ` Ludovic Courtès
2021-06-15 6:57 ` Pierre Neidhardt
2021-06-16 5:33 ` zimoun [this message]
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=867diujrvg.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.