GNU bug report logs - #27007
'menu-entry' disappeared from the bootloader API

Previous Next

Package: guix;

Reported by: Tomáš Čech <sleep_walker <at> gnu.org>

Date: Sat, 20 May 2017 20:01:02 UTC

Severity: important

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #68 received at 27007 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 27007 <at> debbugs.gnu.org
Subject: Re: bug#27007: [PATCH 1/2] bootloader: Use menu-entry to define
 custom bootloader entries.
Date: Thu, 1 Jun 2017 00:11:31 +0200
Hi Mathieu,

On Wed, 31 May 2017 09:23:27 +0200
Mathieu Othacehe <m.othacehe <at> gmail.com> wrote:

> +(define-record-type* <menu-entry>
...
> +  (initrd          menu-entry-initrd))     ; file name of the initrd as a gexp

For another future patch:  Hmm, should we make this optional?  I didn't have an initrd for many years.

> --- a/gnu/bootloader/extlinux.scm
> +++ b/gnu/bootloader/extlinux.scm
> @@ -37,7 +37,8 @@
>  corresponding to old generations of the system."
>  
>    (define all-entries
> -    (append entries (bootloader-configuration-menu-entries config)))
> +    (append entries (map menu-entry->boot-parameters
> +                         (bootloader-configuration-menu-entries config))))

Since we have menu-entry as a public datatype now, should we maybe use menu-entries for all the bootloader stuff ?  I think this would be easier to maintain because boot-parameters is a serialized format we can't easily change (because it's stored into a "parameters" file per generation, and generations can't ever be deleted).

In that case maybe it could rather be boot-parameters->menu-entry for the other (i.e. the GuixSD) entries instead of this.

> +  (define (boot-parameters->gexp params)

Maybe rather menu-entry->gexp and take a menu-entry ?

> +(define (menu-entry->boot-parameters menu-entry)

Then we'd have menu-entry->boot-parameters *and* boot-parameters->menu-entry which is usually a dead giveaway that we are doing something strange.  It would make it either a 1:1 map or lose data on the roundtrip, both of which are weird.

That's why I think if we have public <menu-entry> records anyway now, let's use them for the bootloader stuff throughout.

WDYT?




This bug report was last modified 8 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.