From 5283d24062be62f59ff9f14fa7095ebcfcb7a9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 22 Nov 2023 23:17:04 +0100 Subject: =?UTF-8?q?shell:=20Disable=20caching=20for=20=E2=80=98guix=20shel?= =?UTF-8?q?l=20-f=20guix.scm=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * guix/scripts/shell.scm (profile-cached-gc-root): Distinguish the two ‘load’ cases; return #f and #f for (load ad-hoc-package _). Reported-by: Pierre-Henry Fröhring . Change-Id: I00282fbd41aeed09fb927690945cf65e1f9efe4d --- guix/scripts/shell.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index ef22cd60e6..0584a7e018 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -398,10 +398,17 @@ return #f and #f." (values #f #f))) ((('nesting? . #t) . rest) (loop rest system file (append specs '("nested guix")))) - ((('load . (_ candidate)) . rest) + ((('load . ('package candidate)) . rest) + ;; This is 'guix shell -D -f guix.scm'. (if (and (not file) (null? specs)) (loop rest system candidate specs) (values #f #f))) + ((('load . ('ad-hoc-package candidate)) . rest) + ;; When running 'guix shell -f guix.scm', one typically expects + ;; 'guix.scm' to be evaluated every time because it may contain + ;; references like (local-file "." #:recursive? #t). Thus, disable + ;; caching. + (values #f #f)) ((('manifest . candidate) . rest) (if (and (not file) (null? specs)) (loop rest system candidate specs) -- cgit v1.2.3