mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
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.
This commit is contained in:
parent
e1d1ec1435
commit
8155a20907
1 changed files with 11 additions and 7 deletions
|
@ -243,13 +243,17 @@ (define (migrate-generations profile directory)
|
|||
(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)
|
||||
|
|
Loading…
Reference in a new issue