Christopher Baines wrote 3 years ago
(address . guix-patches@gnu.org)
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(-)
Toggle diff (31 lines)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 63e3b9b934..b9084a401c 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -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)
--
2.36.1