aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2018-04-17 09:23:00 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2018-06-01 09:40:07 +0200
commit8fc3a971b0b0785895d1a23f7ad372026cb63550 (patch)
tree3511b83517bd602e49ff9183e5a6f7d47ead2716 /guix/scripts/system.scm
parente90322d20189128cef27a6c4887e82e7ee4756c0 (diff)
downloadgnu-guix-8fc3a971b0b0785895d1a23f7ad372026cb63550.tar
gnu-guix-8fc3a971b0b0785895d1a23f7ad372026cb63550.tar.gz
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.
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 5d0df14924..766cab1aad 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -393,9 +393,11 @@ it atomically, and then run OS's activation script."
"~Y-~m-~d ~H:~M")))
(define* (profile-boot-parameters #:optional (profile %system-profile)
- (numbers (generation-numbers profile)))
- "Return a list of 'boot-parameters' for the generations of PROFILE specified by
-NUMBERS, which is a list of generation numbers."
+ (numbers
+ (reverse (generation-numbers profile))))
+ "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)
(unless-file-not-found
(let* ((params (read-boot-parameters-file system))