From 1e9698344dcd0f44453be7cbb384a2eefe46441f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 13 Feb 2019 15:31:05 +0100 Subject: [PATCH] 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'. --- guix/scripts/system.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ (define (reinstall-bootloader store number) ;; 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))