mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 06:36:37 -05:00
scripts: system: Sort profile generations in reverse order.
* guix/scripts/system.scm (profile-boot-parameters): Reverse generation-numbers list. This allows old generations to be listed from most recent to oldest in bootloaders configuration files.
This commit is contained in:
parent
e90322d201
commit
8fc3a971b0
1 changed files with 5 additions and 3 deletions
|
@ -393,9 +393,11 @@ (define (seconds->string seconds)
|
||||||
"~Y-~m-~d ~H:~M")))
|
"~Y-~m-~d ~H:~M")))
|
||||||
|
|
||||||
(define* (profile-boot-parameters #:optional (profile %system-profile)
|
(define* (profile-boot-parameters #:optional (profile %system-profile)
|
||||||
(numbers (generation-numbers profile)))
|
(numbers
|
||||||
"Return a list of 'boot-parameters' for the generations of PROFILE specified by
|
(reverse (generation-numbers profile))))
|
||||||
NUMBERS, which is a list of generation numbers."
|
"Return a list of 'boot-parameters' for the generations of PROFILE specified
|
||||||
|
by NUMBERS, which is a list of generation numbers. The list is ordered from
|
||||||
|
the most recent to the oldest profiles."
|
||||||
(define (system->boot-parameters system number time)
|
(define (system->boot-parameters system number time)
|
||||||
(unless-file-not-found
|
(unless-file-not-found
|
||||||
(let* ((params (read-boot-parameters-file system))
|
(let* ((params (read-boot-parameters-file system))
|
||||||
|
|
Loading…
Reference in a new issue