Subject: bug#26339: [PATCH v2 01/12] system: Pass <bootloader-parameter> to grub.

From: [email-masked] (Ludovic Courtès)
Date: Mon, 08 May 2017 11:37:41 +0200

Hi,

Mathieu Othacehe <[email-masked]> skribis:

> * gnu/system.scm (operating-system-grub.cfg): Pass <bootloader-parameter>.
> * gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
>   (grub-configuration-file): Use boot-parameters->menu-entry.

This patch as applied in 2e58e05bb6 causes a circular dependency between
(gnu system) and (gnu system grub), which is not OK given that they rely
on macros (actually record accessors) coming from each others.  This
causes evaluation to fail (see
<https://hydra.gnu.org/jobset/gnu/master#tabs-errors>):

--8<---------------cut here---------------start------------->8---
In gnu/system/grub.scm:
 272: 1 [boot-parameters->menu-entry #]
In unknown file:
   ?: 0 [# #]

ERROR: In procedure #<syntax-transformer boot-parameters-label>:
ERROR: Wrong type to apply: #<syntax-transformer boot-parameters-label>
--8<---------------cut here---------------end--------------->8---

Since the goal of this patch set was to support multiple bootloaders,
the right fix would be for (gnu system) to not use (gnu system grub).
Instead there should probably be a (gnu system bootloaders) module
providing a bootloader abstraction.

However, I’m not sure about the details of all this.  If we cannot fix
it today, we’ll have to revert this change, though I’m unsure exactly
how many commits depend on it.

Thoughts?

Ludo’.