aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-02-13 15:31:05 +0100
committerLudovic Courtès <ludo@gnu.org>2019-02-13 16:19:54 +0100
commit1e9698344dcd0f44453be7cbb384a2eefe46441f (patch)
treee7b9df38108d3e52c37e68e732e1b833b9311735
parent499b166d1ce3ead61afb985053012ceb451f3beb (diff)
downloadguix-1e9698344dcd0f44453be7cbb384a2eefe46441f.tar
guix-1e9698344dcd0f44453be7cbb384a2eefe46441f.tar.gz
guix system: List old generations from newest to oldest.
Previously 'guix system switch-generation' or 'delete-generations' would yield a GRUB menu where entries for old generations were in the wrong order (i.e., oldest first.) * guix/scripts/system.scm (reinstall-bootloader): Reverse the list returned by 'generation-numbers'.
-rw-r--r--guix/scripts/system.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index c0301eac2b..d67b9f8185 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -492,7 +492,8 @@ STORE is an open connection to the store."
;; Make the specified system generation the default entry.
(params (profile-boot-parameters %system-profile (list number)))
- (old-generations (delv number (generation-numbers %system-profile)))
+ (old-generations
+ (delv number (reverse (generation-numbers %system-profile))))
(old-params (profile-boot-parameters
%system-profile old-generations))
(entries (map boot-parameters->menu-entry params))