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'.
This commit is contained in:
Ludovic Courtès 2019-02-13 15:31:05 +01:00
parent 499b166d1c
commit 1e9698344d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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))