unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31159: Reverse order for old grub.cfg entries
@ 2018-04-15  3:20 ` Vagrant Cascadian
  2018-04-15 17:22   ` Joshua Branson
                     ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Vagrant Cascadian @ 2018-04-15  3:20 UTC (permalink / raw)
  To: 31159

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

Hi!

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.


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-15  3:20 ` bug#31159: Reverse order for old grub.cfg entries Vagrant Cascadian
@ 2018-04-15 17:22   ` Joshua Branson
  2018-04-16 14:33   ` Mark H Weaver
       [not found]   ` <handler.31159.C.152775849827440.notifdonectrl.0@debbugs.gnu.org>
  2 siblings, 0 replies; 13+ messages in thread
From: Joshua Branson @ 2018-04-15 17:22 UTC (permalink / raw)
  To: 31159


That's actually a pretty good idea!

Vagrant Cascadian <vagrant@debian.org> writes:

> Hi!
>
> 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.
>
> live well,
>   vagrant

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-15  3:20 ` bug#31159: Reverse order for old grub.cfg entries Vagrant Cascadian
  2018-04-15 17:22   ` Joshua Branson
@ 2018-04-16 14:33   ` Mark H Weaver
  2018-04-17  8:16     ` Mathieu Othacehe
       [not found]   ` <handler.31159.C.152775849827440.notifdonectrl.0@debbugs.gnu.org>
  2 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2018-04-16 14:33 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: 31159

Vagrant Cascadian <vagrant@debian.org> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-16 14:33   ` Mark H Weaver
@ 2018-04-17  8:16     ` Mathieu Othacehe
  2018-04-17 18:18       ` Mark H Weaver
  0 siblings, 1 reply; 13+ messages in thread
From: Mathieu Othacehe @ 2018-04-17  8:16 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Vagrant Cascadian, 31159

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-scripts-system-Sort-profile-generations-in-reverse-o.patch --]
[-- Type: text/x-diff, Size: 1545 bytes --]

From 3ec63fb55a074b547724c70d560cc61776c9298e Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 680 bytes --]



Mark H Weaver writes:

> Vagrant Cascadian <vagrant@debian.org> 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-17  8:16     ` Mathieu Othacehe
@ 2018-04-17 18:18       ` Mark H Weaver
  2018-04-18 14:04         ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2018-04-17 18:18 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: Vagrant Cascadian, 31159

Mathieu Othacehe <m.othacehe@gmail.com> writes:

> 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 ?

Thank you, Mathieu!  I doubt that there's a need to make this
configurable, but I'd like to hear an opinion from Ludovic, since I
guess he was the one who implemented the current ordering.

What do you think, Ludovic?

      Mark


> From 3ec63fb55a074b547724c70d560cc61776c9298e Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <m.othacehe@gmail.com>
> 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))

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-17 18:18       ` Mark H Weaver
@ 2018-04-18 14:04         ` Ludovic Courtès
  2018-04-18 19:23           ` Mark H Weaver
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-18 14:04 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Vagrant Cascadian, 31159

Hello,

Mark H Weaver <mhw@netris.org> skribis:

> Mathieu Othacehe <m.othacehe@gmail.com> writes:
>
>> 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 ?
>
> Thank you, Mathieu!  I doubt that there's a need to make this
> configurable, but I'd like to hear an opinion from Ludovic, since I
> guess he was the one who implemented the current ordering.
>
> What do you think, Ludovic?

I agree with you.  As long as the entry labels clearly show which one is
the most recent, that sounds good.

However!  On headless machines, we’d rather make sure users know about
this change.  On our Libreboot “bayfront” server, GRUB for some reason
fails to display anything, and on several occasions we’ve had to blindly
select an older generation.  Hopefully this is an unusual situation ;-),
but it could happen on ARM boards as well.

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-18 14:04         ` Ludovic Courtès
@ 2018-04-18 19:23           ` Mark H Weaver
  2018-04-18 20:14             ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2018-04-18 19:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Vagrant Cascadian, 31159

Hi Ludovic,

ludo@gnu.org (Ludovic Courtès) writes:
> I agree with you.  As long as the entry labels clearly show which one is
> the most recent, that sounds good.
>
> However!  On headless machines, we’d rather make sure users know about
> this change.  On our Libreboot “bayfront” server, GRUB for some reason
> fails to display anything, and on several occasions we’ve had to blindly
> select an older generation.  Hopefully this is an unusual situation ;-),
> but it could happen on ARM boards as well.

Do you have an idea of how to make sure that users know about it?

      Mark

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-18 19:23           ` Mark H Weaver
@ 2018-04-18 20:14             ` Ludovic Courtès
  2018-04-19 15:21               ` Mathieu Othacehe
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-18 20:14 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Vagrant Cascadian, 31159

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>> I agree with you.  As long as the entry labels clearly show which one is
>> the most recent, that sounds good.
>>
>> However!  On headless machines, we’d rather make sure users know about
>> this change.  On our Libreboot “bayfront” server, GRUB for some reason
>> fails to display anything, and on several occasions we’ve had to blindly
>> select an older generation.  Hopefully this is an unusual situation ;-),
>> but it could happen on ARM boards as well.
>
> Do you have an idea of how to make sure that users know about it?

Not really.  I think we can at least send a heads-up to guix-devel and
help-guix.

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-18 20:14             ` Ludovic Courtès
@ 2018-04-19 15:21               ` Mathieu Othacehe
  2018-04-23 15:16                 ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Mathieu Othacehe @ 2018-04-19 15:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Vagrant Cascadian, 31159


> Not really.  I think we can at least send a heads-up to guix-devel and
> help-guix.

Ok. Would the attached patch earlier in the thread be ok for you then ?

Thanks,

Mathieu

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: Reverse order for old grub.cfg entries
  2018-04-19 15:21               ` Mathieu Othacehe
@ 2018-04-23 15:16                 ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2018-04-23 15:16 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: Vagrant Cascadian, 31159

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> Not really.  I think we can at least send a heads-up to guix-devel and
>> help-guix.
>
> Ok. Would the attached patch earlier in the thread be ok for you then ?

Sure!

Ludo'.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: #31159: Reverse order for old grub.cfg entries
       [not found]   ` <handler.31159.C.152775849827440.notifdonectrl.0@debbugs.gnu.org>
@ 2018-05-31 22:07     ` Vagrant Cascadian
  2018-06-01  2:18       ` Mark H Weaver
  0 siblings, 1 reply; 13+ messages in thread
From: Vagrant Cascadian @ 2018-05-31 22:07 UTC (permalink / raw)
  To: 31159

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

On 2018-05-31, GNU bug Tracking System wrote:
> This is an automatic notification regarding your bug report
> #31159: Reverse order for old grub.cfg entries,
> which was filed against the guix package.
>
> Thank you for your report, which has now been closed.
> You can view the full report at
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31159

I don't see that the proposed patch was applied to any of the guix
branches I'm aware of. Has it been merged and just not yet been pushed?
Does it need to go to guix-patches instead of guix-bugs?

Thanks!

live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: #31159: Reverse order for old grub.cfg entries
  2018-05-31 22:07     ` bug#31159: #31159: " Vagrant Cascadian
@ 2018-06-01  2:18       ` Mark H Weaver
  2018-06-01  7:46         ` Mathieu Othacehe
  0 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2018-06-01  2:18 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: Vagrant Cascadian, 31159

reopen 31159
tags 31159 - fixed
thanks

Hi Clément,

According to our bug tracking system, you added the "fixed" tag to bug
31159 and closed it.  I think this must have been a mistake.  Did you
intend to close a different bug?  This bug has to do with the fact that
the order of old grub.cfg entries should arguably be reversed.

       Mark


Vagrant Cascadian <vagrant@debian.org> writes:

> On 2018-05-31, GNU bug Tracking System wrote:
>> This is an automatic notification regarding your bug report
>> #31159: Reverse order for old grub.cfg entries,
>> which was filed against the guix package.
>>
>> Thank you for your report, which has now been closed.
>> You can view the full report at
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31159
>
> I don't see that the proposed patch was applied to any of the guix
> branches I'm aware of. Has it been merged and just not yet been pushed?
> Does it need to go to guix-patches instead of guix-bugs?
>
> Thanks!
>
> live well,
>   vagrant

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#31159: #31159: Reverse order for old grub.cfg entries
  2018-06-01  2:18       ` Mark H Weaver
@ 2018-06-01  7:46         ` Mathieu Othacehe
  0 siblings, 0 replies; 13+ messages in thread
From: Mathieu Othacehe @ 2018-06-01  7:46 UTC (permalink / raw)
  To: Mark H Weaver
  Cc: Vagrant Cascadian, 31159-done, help-guix, Clément Lassieur


Hello,

I tought this one was pushed and told Clément it was ok to push, my
mistake! I just pushed it, so I close the ticket now.

To people used to select bootloader entries with shortcuts, be aware
that at next reconfigure, the entries will be reversed on all
bootloaders (top of the list => most recent configuration).

Thanks,

Mathieu

Mark H Weaver writes:

> reopen 31159
> tags 31159 - fixed
> thanks
>
> Hi Clément,
>
> According to our bug tracking system, you added the "fixed" tag to bug
> 31159 and closed it.  I think this must have been a mistake.  Did you
> intend to close a different bug?  This bug has to do with the fact that
> the order of old grub.cfg entries should arguably be reversed.
>
>        Mark
>
>
> Vagrant Cascadian <vagrant@debian.org> writes:
>
>> On 2018-05-31, GNU bug Tracking System wrote:
>>> This is an automatic notification regarding your bug report
>>> #31159: Reverse order for old grub.cfg entries,
>>> which was filed against the guix package.
>>>
>>> Thank you for your report, which has now been closed.
>>> You can view the full report at
>>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31159
>>
>> I don't see that the proposed patch was applied to any of the guix
>> branches I'm aware of. Has it been merged and just not yet been pushed?
>> Does it need to go to guix-patches instead of guix-bugs?
>>
>> Thanks!
>>
>> live well,
>>   vagrant

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-06-01  7:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87r2lsji3l.fsf@lassieur.org>
2018-04-15  3:20 ` bug#31159: Reverse order for old grub.cfg entries Vagrant Cascadian
2018-04-15 17:22   ` Joshua Branson
2018-04-16 14:33   ` Mark H Weaver
2018-04-17  8:16     ` Mathieu Othacehe
2018-04-17 18:18       ` Mark H Weaver
2018-04-18 14:04         ` Ludovic Courtès
2018-04-18 19:23           ` Mark H Weaver
2018-04-18 20:14             ` Ludovic Courtès
2018-04-19 15:21               ` Mathieu Othacehe
2018-04-23 15:16                 ` Ludovic Courtès
     [not found]   ` <handler.31159.C.152775849827440.notifdonectrl.0@debbugs.gnu.org>
2018-05-31 22:07     ` bug#31159: #31159: " Vagrant Cascadian
2018-06-01  2:18       ` Mark H Weaver
2018-06-01  7:46         ` Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).