From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: bug#31159: Reverse order for old grub.cfg entries Date: Tue, 17 Apr 2018 10:16:07 +0200 Message-ID: <87a7u2qmd4.fsf@gmail.com> References: <87h8odb1fo.fsf@aikidev.net> <87y3hnnru3.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8LnY-0005wT-9E for bug-guix@gnu.org; Tue, 17 Apr 2018 04:17:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8LnS-0003NI-Hb for bug-guix@gnu.org; Tue, 17 Apr 2018 04:17:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48745) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8LnS-0003Ml-9Z for bug-guix@gnu.org; Tue, 17 Apr 2018 04:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8LnS-0003D3-0a for bug-guix@gnu.org; Tue, 17 Apr 2018 04:17:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87y3hnnru3.fsf@netris.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mark H Weaver Cc: Vagrant Cascadian , 31159@debbugs.gnu.org --=-=-= Content-Type: text/plain Hi, This seems like a good idea ! If we decide to make it unconditional the patch attached does the job. We can also make it configurable in bootloader-configuration for instance. WDYT ? Mathieu --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-scripts-system-Sort-profile-generations-in-reverse-o.patch >From 3ec63fb55a074b547724c70d560cc61776c9298e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 17 Apr 2018 09:23:00 +0200 Subject: [PATCH] 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 b50cabc..7e1363c 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)) -- 2.7.4 --=-=-= Content-Type: text/plain Mark H Weaver writes: > Vagrant Cascadian writes: > >> This is a pretty minor issue, but I've found that the "GNU system, old >> configurations..." part of the menu would be nicer if the most recent >> generations were listed at the top, rather than the oldest generations. >> >> Currently it lists generation 1 as the first entry in the list, and if >> I've got 50+ generations installed and I don't want to boot the current >> generation, I'm most likely going to want to revert to one of the more >> recent generations rather than the very oldest. > > I agree that it would be better to reverse the order of these entries. > > Thanks, > Mark --=-=-=--