[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50960] [PATCH 10/10] shell: Maintain a profile cache.
From: |
Maxime Devos |
Subject: |
[bug#50960] [PATCH 10/10] shell: Maintain a profile cache. |
Date: |
Sat, 02 Oct 2021 15:52:35 +0200 |
User-agent: |
Evolution 3.34.2 |
Ludovic Courtès schreef op za 02-10-2021 om 12:22 [+0200]:
> +(define (profile-cache-key file)
> + "Return the cache key for the profile corresponding to FILE, a 'guix.scm'
> or
> +'manifest.scm' file, or #f if we lack channel information."
> + (match (current-channels)
> + (() #f)
> + (((= channel-commit commits) ...)
> + (let ((stat (stat file)))
> + (bytevector->base32-string
> + (sha256 (string->utf8
> + (string-append (string-join commits) ":"
> + (basename file) ":"
> + (number->string (stat:dev stat)) ":"
> + (number->string (stat:ino stat))))))))))
Why only use the 'basename' of a file name instead of the full name?
(Consider the case where a user has multiple "guix.scm" or "manifest.scm".)
This turns out to be unproblematic, because stat:dev and stat:ino is included
as well, though including (a part of) the file name is superfluous because
stat:dev and stat:ino are included.
Could you document the rationale for including the file name, and why only
the basename is included instead of the full file name?
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#50960] [PATCH 05/10] environment: Add tests for '--profile'., (continued)
- [bug#50960] [PATCH 05/10] environment: Add tests for '--profile'., Ludovic Courtès, 2021/10/02
- [bug#50960] [PATCH 07/10] environment: Do not connect to the daemon when '--profile' is used., Ludovic Courtès, 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/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 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 <=
- [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 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