guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/08: shell: Disable caching when '-p' is passed.


From: guix-commits
Subject: 01/08: shell: Disable caching when '-p' is passed.
Date: Wed, 2 Mar 2022 13:27:07 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ee6275c9744f8649bccc8cfa7c52d100044d7570
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Wed Mar 2 11:58:51 2022 +0100

    shell: Disable caching when '-p' is passed.
    
    Fixes <https://issues.guix.gnu.org/53658>.
    Reported by Guillaume Le Vaillant <glv@posteo.net>.
    
    Previously we would wrongfully cache things, by adding a
    new (profile . _) pair to the option alist, when the user runs:
    
      guix shell -p /path/to/profile -q
    
    * guix/scripts/shell.scm (profile-cached-gc-root): Add ('profile . _) case.
---
 guix/scripts/shell.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm
index a92932cbc9..1eab05d737 100644
--- a/guix/scripts/shell.scm
+++ b/guix/scripts/shell.scm
@@ -372,6 +372,10 @@ return #f and #f."
        ;; least depending on external state (with-source, with-commit, etc.),
        ;; so do not cache anything when they're used.
        (values #f #f))
+      ((('profile . _) . _)
+       ;; If the user already specified a profile, there's nothing more to
+       ;; cache.
+       (values #f #f))
       ((('system . system) . rest)
        (loop rest system file specs))
       ((_ . rest) (loop rest system file specs)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]