summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-10-12 16:43:18 +0200
committerLudovic Courtès <ludo@gnu.org>2018-10-12 16:45:34 +0200
commitaa227b3be3d7728331a08dbd139c47c9b271dc23 (patch)
tree9e93ee69c346b49ecfb4eee81d86851d3bf20c4f
parent6826f1e1ede0526dd1247546aa5ec195bacd5cc5 (diff)
pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.
This is a followup to 8155a209071f981fbf359975f463be4bcf8fa23e. * guix/scripts/pull.scm (migrate-generations): Compute the right target for /var/guix/profiles/per-user/USER/current-guix. Previously we'd return "current-N-link" instead of "current-guix-N-link'.
-rw-r--r--guix/scripts/pull.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 660a2b9110..d3fd624228 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -243,9 +243,7 @@ Download and deploy the latest version of Guix.\n"))
(format (current-error-port)
(G_ "Migrating profile generations to '~a'...~%")
%profile-directory)
- (let ((current (basename
- (generation-file-name profile
- (generation-number profile)))))
+ (let ((current (generation-number profile)))
(for-each (lambda (generation)
(let ((source (generation-file-name profile generation))
(target (string-append directory "/current-guix-"
@@ -256,7 +254,9 @@ Download and deploy the latest version of Guix.\n"))
(symlink (readlink source) target)
(delete-file source)))
(profile-generations profile))
- (symlink current (string-append directory "/current-guix"))))
+ (symlink (string-append "current-guix-"
+ (number->string current) "-link")
+ (string-append directory "/current-guix"))))
(define (ensure-default-profile)
(ensure-profile-directory)