guix-commits
[Top][All Lists]
Advanced

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

02/02: pull: Create profile after the store connection has been opened.


From: guix-commits
Subject: 02/02: pull: Create profile after the store connection has been opened.
Date: Mon, 22 Apr 2019 06:01:39 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit a06a95baffc2005ad1a64c4c3f82fc328e0d0009
Author: Ludovic Court├Ęs <address@hidden>
Date:   Mon Apr 22 11:50:49 2019 +0200

    pull: Create profile after the store connection has been opened.
    
    Fixes <https://bugs.gnu.org/35341>.
    Reported by Florian Pelz <address@hidden>.
    
    Previously, we'd call 'ensure-default-profile' before the connection to
    the daemon has been opened.  On the first connection, the daemon ensures
    that /var/guix/profiles/per-user is world-writable.  Since we were
    calling 'ensure-default-profile' before that,
    /var/guix/profiles/per-user was typically non-writable (555 and
    root-owned), and thus 'guix pull' would error out.
    
    * guix/scripts/pull.scm (guix-pull): Call 'ensure-default-profile'
    within 'with-store'.
---
 guix/scripts/pull.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 04e83f9..3929cd4 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -561,11 +561,11 @@ Use '~/.config/guix/channels.scm' instead."))
             (cache    (string-append (cache-directory) "/pull"))
             (channels (channel-list opts))
             (profile  (or (assoc-ref opts 'profile) %current-profile)))
-       (ensure-default-profile)
        (cond ((assoc-ref opts 'query)
               (process-query opts profile))
              (else
               (with-store store
+                (ensure-default-profile)
                 (with-status-verbosity (assoc-ref opts 'verbosity)
                   (parameterize ((%current-system (assoc-ref opts 'system))
                                  (%graft? (assoc-ref opts 'graft?))



reply via email to

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