aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-22 11:50:49 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-22 12:01:32 +0200
commita06a95baffc2005ad1a64c4c3f82fc328e0d0009 (patch)
treefddf34ab146d0cd8c7bf91ce4f5fed278e26928e
parentc5265a095172b213ba6fbdf618d6779359ca56b2 (diff)
downloadguix-a06a95baffc2005ad1a64c4c3f82fc328e0d0009.tar.gz
guix-a06a95baffc2005ad1a64c4c3f82fc328e0d0009.zip
pull: Create profile after the store connection has been opened.
Fixes <https://bugs.gnu.org/35341>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. 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'.
-rw-r--r--guix/scripts/pull.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 04e83f970f..3929cd402e 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?))