From e60b41de1effc93918d02c6049d9503d8814eb48 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 20 Jun 2022 12:33:57 +0100 Subject: 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. --- guix/scripts/system.scm | 11 +++++------ 1 file 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) -- cgit v1.2.3