guix-commits
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: 01/01: pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.
Date: Fri, 12 Oct 2018 10:45:41 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit aa227b3be3d7728331a08dbd139c47c9b271dc23
Author: Ludovic Courtès <address@hidden>
Date:   Fri Oct 12 16:43:18 2018 +0200

    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'.
---
 guix/scripts/pull.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 660a2b9..d3fd624 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)



reply via email to

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