mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
shell: Take grafting into account when caching.
Fixes <https://issues.guix.gnu.org/64856>. * guix/scripts/shell.scm (profile-file-cache-key) (profile-spec-cache-key): Take (%graft?) into account. Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
2812eb2e1b
commit
75bdf8e06a
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,7 @@ (define-module (guix scripts shell)
|
||||||
#:autoload (guix transformations) (options->transformation
|
#:autoload (guix transformations) (options->transformation
|
||||||
transformation-option-key?
|
transformation-option-key?
|
||||||
show-transformation-options-help)
|
show-transformation-options-help)
|
||||||
|
#:autoload (guix grafts) (%graft?)
|
||||||
#:use-module (guix scripts)
|
#:use-module (guix scripts)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix profiles)
|
#:use-module (guix profiles)
|
||||||
|
@ -354,6 +355,7 @@ (define (profile-file-cache-key file system)
|
||||||
;; be insufficient: <https://lwn.net/Articles/866582/>.
|
;; be insufficient: <https://lwn.net/Articles/866582/>.
|
||||||
(sha256 (string->utf8
|
(sha256 (string->utf8
|
||||||
(string-append primary-key ":" system ":"
|
(string-append primary-key ":" system ":"
|
||||||
|
(if (%graft?) "" "ungrafted:")
|
||||||
(number->string (stat:dev stat)) ":"
|
(number->string (stat:dev stat)) ":"
|
||||||
(number->string (stat:ino stat))))))))))
|
(number->string (stat:ino stat))))))))))
|
||||||
|
|
||||||
|
@ -366,6 +368,7 @@ (define (profile-spec-cache-key specs system)
|
||||||
(bytevector->base32-string
|
(bytevector->base32-string
|
||||||
(sha256 (string->utf8
|
(sha256 (string->utf8
|
||||||
(string-append primary-key ":" system ":"
|
(string-append primary-key ":" system ":"
|
||||||
|
(if (%graft?) "" "ungrafted:")
|
||||||
(object->string specs))))))))
|
(object->string specs))))))))
|
||||||
|
|
||||||
(define (profile-cached-gc-root opts)
|
(define (profile-cached-gc-root opts)
|
||||||
|
|
Loading…
Reference in a new issue