pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.

This is a followup to 8155a20907.

* 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'.
master
Ludovic Courtès 2018-10-12 16:43:18 +02:00
parent 6826f1e1ed
commit aa227b3be3
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 4 deletions

View File

@ -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)