guix system: Inline menu-entries in to bootcfg in perform-action.

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.
This commit is contained in:
Christopher Baines 2022-06-20 12:33:57 +01:00
parent 4f6ed3d2f8
commit 9d30cfa337
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577

@ -800,11 +800,6 @@ static checks."
(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 @@ static checks."
(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)