[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50960] [PATCH 09/10] cache: Gracefully handle non-existent cache.
From: |
Maxime Devos |
Subject: |
[bug#50960] [PATCH 09/10] cache: Gracefully handle non-existent cache. |
Date: |
Sat, 02 Oct 2021 15:28:51 +0200 |
User-agent: |
Evolution 3.34.2 |
Ludovic Courtès schreef op za 02-10-2021 om 12:22 [+0200]:
> * guix/cache.scm (maybe-remove-expired-cache-entries): Ignore ENOENT
> when writing EXPIRY-FILE.
> ---
> guix/cache.scm | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/guix/cache.scm b/guix/cache.scm
> index 0401a9d428..51009809bd 100644
> --- a/guix/cache.scm
> +++ b/guix/cache.scm
> @@ -101,7 +101,13 @@ CLEANUP-PERIOD denotes the minimum time between two
> cache cleanups."
> #:now now
> #:entry-expiration entry-expiration
> #:delete-entry delete-entry)
> - (call-with-output-file expiry-file
> - (cute write (time-second now) <>))))
> + (catch 'system-error
> + (lambda ()
> + (call-with-output-file expiry-file
> + (cute write (time-second now) <>)))
> + (lambda args
> + ;; ENOENT means CACHE does not exist.
> + (unless (= ENOENT (system-error-errno args))
And EROFS perhaps, such that "guix shell" works even if the root file system was
remounted read-only for some reason and all the necessary derivations have
already
been built.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., (continued)
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Maxime Devos, 2021/10/02
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Ludovic Courtès, 2021/10/04
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., zimoun, 2021/10/04
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Maxime Devos, 2021/10/04
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Ludovic Courtès, 2021/10/08
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Maxime Devos, 2021/10/02
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Ludovic Courtès, 2021/10/02
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Maxime Devos, 2021/10/02
- [bug#50960] [PATCH 10/10] shell: Maintain a profile cache., Ludovic Courtès, 2021/10/04
[bug#50960] [PATCH 09/10] cache: Gracefully handle non-existent cache., Ludovic Courtès, 2021/10/02
- [bug#50960] [PATCH 09/10] cache: Gracefully handle non-existent cache.,
Maxime Devos <=
[bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment', Jelle Licht, 2021/10/02
[bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment', pelzflorian (Florian Pelz), 2021/10/02
[bug#50960] ‘guix shell’ shebangs, Ludovic Courtès, 2021/10/02