From aa227b3be3d7728331a08dbd139c47c9b271dc23 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Oct 2018 16:43:18 +0200 Subject: 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 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) -- cgit v1.2.3