diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 8e0595076a..660a2b9110 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -239,7 +239,7 @@ (define %user-profile-directory (string-append (config-directory #:ensure? #f) "/current")) (define (migrate-generations profile directory) - "Migration the generations of PROFILE to DIRECTORY." + "Migrate the generations of PROFILE to DIRECTORY." (format (current-error-port) (G_ "Migrating profile generations to '~a'...~%") %profile-directory) @@ -251,7 +251,10 @@ (define (migrate-generations profile directory) (target (string-append directory "/current-guix-" (number->string generation) "-link"))) - (rename-file source target))) + ;; Note: Don't use 'rename-file' as SOURCE and TARGET might + ;; live on different file systems. + (symlink (readlink source) target) + (delete-file source))) (profile-generations profile)) (symlink current (string-append directory "/current-guix"))))