Subject: Re: [bug#75027] [PATCH v2 3/3] reconfigure: Support loading the system for kexec reboot.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 28 Dec 2024 16:22:52 +0900

Hi,

Ludovic Courtès <[email-masked]> writes:

> This allows rebooting straight into the new system with ‘reboot -k’.
>
> * guix/scripts/system/reconfigure.scm (kexec-loading-program)
> (load-system-for-kexec): New procedures.
> * gnu/tests/reconfigure.scm (run-kexec-test): New procedure.
> (%test-upgrade-kexec): New variable.
> * guix/scripts/system.scm (perform-action): Add #:load-for-kexec?.
> Call ‘load-system-for-kexec’.
> (show-help, %options): Add ‘--no-kexec’.
> (%default-options): Add ‘load-for-kexec?’.
> (process-action): Honor it and pass it to ‘perform-action’.
> * gnu/machine/ssh.scm (deploy-managed-host): Add call to
> ‘load-system-for-kexec’.
> * doc/guix.texi (Invoking guix system): Document it.

Neat.

[...]

> +@cindex kexec, for fast reboots
> +@cindex rebooting @i{via} Linux kexec

Oh, special formatting in index entries; is that allowed/encouraged?

[...]

> --- a/gnu/machine/ssh.scm
> +++ b/gnu/machine/ssh.scm
> @@ -1,6 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2019 Jakob L. Kreuze <[email-masked]>
> -;;; Copyright © 2020-2023 Ludovic Courtès <[email-masked]>
> +;;; Copyright © 2020-2024 Ludovic Courtès <[email-masked]>
>  ;;; Copyright © 2024 Ricardo <[email-masked]>
>  ;;;
>  ;;; This file is part of GNU Guix.
> @@ -552,6 +552,13 @@ (define (deploy-managed-host machine)
>                                                        (inferior-exception-arguments
>                                                         c)))
>                                             os)
> +                (load-system-for-kexec (eval/error-handling c
> +                                         (warning (G_ "\
> +failed to load system of '~a' for kexec reboot:~%~{~s ~}~%")

Nitpick: I guess ideally you don't want a trailing space added in your
formatted list, so you should escape the space something like '~%~{~s~^
~}~%' in your (ice-9 format) format string.

-- 
Thanks,
Maxim