me
/
guix
Archived
1
0
Fork 0

shell: Really take system into account in the cache key.

Fixes <https://issues.guix.gnu.org/63230>.

Previously, when running "guix shell -s X ...", OPTS would contain
something like '((system . "X") ... (system . "DEFAULT")).  Thus, since
'profile-cached-gc-root' would iterate over it in this order, "DEFAULT"
would be passed to 'profile-file-cache-key' and 'profile-spec-cache-key'
instead of "X".

* guix/scripts/shell.scm (profile-cached-gc-root): Reverse OPTS before
entering 'loop'.
Ludovic Courtès 2023-07-13 16:50:27 +02:00
parent ae92d98b93
commit 9c51330315
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -374,7 +374,9 @@ return #f and #f."
(define (key->file key)
(string-append (%profile-cache-directory) "/" key))
(let loop ((opts opts)
;; A given key such as 'system might appear more than once in OPTS, so
;; process it backwards so the last occurrence "wins".
(let loop ((opts (reverse opts))
(system (%current-system))
(file #f)
(specs '()))