[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: pull: Create /var/guix/profiles/per-user/USER/current-guix.
From: |
Ludovic Courtès |
Subject: |
01/02: pull: Create /var/guix/profiles/per-user/USER/current-guix. |
Date: |
Thu, 11 Oct 2018 18:13:42 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 8155a209071f981fbf359975f463be4bcf8fa23e
Author: Ludovic Courtès <address@hidden>
Date: Thu Oct 11 23:53:18 2018 +0200
pull: Create /var/guix/profiles/per-user/USER/current-guix.
Previously the migration code would fail to create that file, so
~/.config/guix/current would be dangling.
* guix/scripts/pull.scm (migrate-generations): Create
/var/guix/profiles/per-user/USER/current-guix.
---
guix/scripts/pull.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 5fecc11..8e05950 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -243,13 +243,17 @@ Download and deploy the latest version of Guix.\n"))
(format (current-error-port)
(G_ "Migrating profile generations to '~a'...~%")
%profile-directory)
- (for-each (lambda (generation)
- (let ((source (generation-file-name profile generation))
- (target (string-append directory "/current-guix-"
- (number->string generation)
- "-link")))
- (rename-file source target)))
- (profile-generations profile)))
+ (let ((current (basename
+ (generation-file-name profile
+ (generation-number profile)))))
+ (for-each (lambda (generation)
+ (let ((source (generation-file-name profile generation))
+ (target (string-append directory "/current-guix-"
+ (number->string generation)
+ "-link")))
+ (rename-file source target)))
+ (profile-generations profile))
+ (symlink current (string-append directory "/current-guix"))))
(define (ensure-default-profile)
(ensure-profile-directory)