aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-06-20 12:33:57 +0100
committerChristopher Baines <mail@cbaines.net>2022-06-23 12:50:48 +0100
commit9d30cfa3372cccc847e75038d34c4ea5b8d8b241 (patch)
treef9962d4bd2e78508d7fcf2df83a3ac038f0327a5
parent4f6ed3d2f8531ce1b75dc79365ce67587d8cb7e1 (diff)
downloadguix-9d30cfa3372cccc847e75038d34c4ea5b8d8b241.tar.gz
guix-9d30cfa3372cccc847e75038d34c4ea5b8d8b241.zip
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.
-rw-r--r--guix/scripts/system.scm11
1 files changed, 5 insertions, 6 deletions
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 @@ 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)