[bug#56122] guix system: Inline menu-entries in to bootcfg in perform-action.
Commit Message
This avoids an exception when generating images, where the reading of boot
parameters fails.
* guix/scripts/system.scm (perform-action): Inline menu-entries in to bootcfg.
---
guix/scripts/system.scm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Comments
Hello Christopher,
Christopher Baines <mail@cbaines.net> writes:
> This avoids an exception when generating images, where the reading of boot
> parameters fails.
>
> * guix/scripts/system.scm (perform-action): Inline menu-entries in to bootcfg.
Good catch! Seems good to me, except for the missing updated copyright
notice at the top.
Best,
Josselin Poiret <dev@jpoiret.xyz> writes:
> Hello Christopher,
>
> Christopher Baines <mail@cbaines.net> writes:
>> This avoids an exception when generating images, where the reading of boot
>> parameters fails.
>>
>> * guix/scripts/system.scm (perform-action): Inline menu-entries in to bootcfg.
>
> Good catch! Seems good to me, except for the missing updated copyright
> notice at the top.
Thanks for taking a look. I've pushed this as
8e2ff622ed7e493a644ebcff62299d2ed1c4e806.
I forgot to update the copyright stuff, but I'll try and remember that
for next time.
Thanks again,
Chris
@@ -800,11 +800,6 @@ (define* (perform-action action image
(define println
(cut format #t "~a~%" <>))
- (define menu-entries
- (if (eq? 'init action)
- '()
- (map boot-parameters->menu-entry (profile-boot-parameters))))
-
(define os
(image-operating-system image))
@@ -813,7 +808,11 @@ (define bootloader
(define bootcfg
(and (memq action '(init reconfigure))
- (operating-system-bootcfg os menu-entries)))
+ (operating-system-bootcfg
+ os
+ (if (eq? action 'init)
+ '()
+ (map boot-parameters->menu-entry (profile-boot-parameters))))))
(when (eq? action 'reconfigure)
(maybe-suggest-running-guix-pull)