[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: scripts: system: Sort profile generations in reverse order.
From: |
Mathieu Othacehe |
Subject: |
01/01: scripts: system: Sort profile generations in reverse order. |
Date: |
Fri, 1 Jun 2018 03:40:28 -0400 (EDT) |
mothacehe pushed a commit to branch master
in repository guix.
commit 8fc3a971b0b0785895d1a23f7ad372026cb63550
Author: Mathieu Othacehe <address@hidden>
Date: Tue Apr 17 09:23:00 2018 +0200
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.
---
guix/scripts/system.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 5d0df14..766cab1 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))