From: Christopher Baines <mail@cbaines.net>
To: 56122@debbugs.gnu.org
Subject: [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.
Date: Tue, 21 Jun 2022 12:19:00 +0100 [thread overview]
Message-ID: <20220621111900.9229-1-mail@cbaines.net> (raw)
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 @@ (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
next reply other threads:[~2022-06-21 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 11:19 Christopher Baines [this message]
2022-06-22 13:09 ` [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action Josselin Poiret via Guix-patches via
2022-06-23 12:09 ` bug#56122: " Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220621111900.9229-1-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=56122@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).