Browse Source

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'.
gn-latest-20200428
Ludovic Courtès 3 years ago
parent
commit
aa227b3be3
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 8
      guix/scripts/pull.scm

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

Loading…
Cancel
Save