mbox series

[bug#69343,00/12] Simplify bootloader data structures and procedures

Message ID cover.1708736440.git.felix.lechner@lease-up.com
Headers show
Series Simplify bootloader data structures and procedures | expand

Message

Felix Lechner Feb. 24, 2024, 1:05 a.m. UTC
The bootloader data structures are hard to understand because the
boot-parameter records are modified on the fly. It happened because those
records are versioned when stored on disk, and changing the data structure was
deemed to difficult. (I agree with that assessment.)

This commit series uses a new record type to separate the on-disk and the
in-memory concerns.

As for the bug fix, I never actually saw the bug but believe from reading the
code that a bug existed. The existence was not verified.

Felix Lechner (12):
  Fix bug where the extra menu entries for a bootloader were shown
    twice.
  Move <boot-parameters> record to a separate file.
  Also move boot-parameters->menu-entry.
  Rename seconds->string procedure to epoch->date-string.
  Move epoch->date-string to gnu/system/boot.scm and use it elsewhere.
  Offer a uniform decorated-boot-label and use it.
  Rename boot-parameters to boot-alternatives when appropriate.
  Rename two remote variables confusingly named 'generations'.
  Give a separate name to a commonly used expression.
  Simplify profile->boot-alternatives.
  Split generation->boot-parameters out of profile->boot-alternatives.
  Encapsulate <boot-parameters> to retain generation, system-path and
    epoch.

 gnu/machine/ssh.scm       |  74 ++++-----
 gnu/system.scm            | 252 +---------------------------
 gnu/system/boot.scm       | 336 ++++++++++++++++++++++++++++++++++++++
 guix/scripts/system.scm   |  71 ++++----
 tests/boot-parameters.scm |   1 +
 5 files changed, 412 insertions(+), 322 deletions(-)
 create mode 100644 gnu/system/boot.scm


base-commit: c0f88cd18649c31c75bcddf8247b14ef3e3a66a5

Comments

Lilah Tascheter March 2, 2024, 11:46 p.m. UTC | #1
In guix/scripts/system.scm(generation->boot-alternative) system-path
isn't defined. Assuming system is supposed to be that?