unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.
@ 2022-06-21 11:19 Christopher Baines
  2022-06-22 13:09 ` Josselin Poiret via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2022-06-21 11:19 UTC (permalink / raw)
  To: 56122

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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.
  2022-06-21 11:19 [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action Christopher Baines
@ 2022-06-22 13:09 ` Josselin Poiret via Guix-patches via
  2022-06-23 12:09   ` bug#56122: " Christopher Baines
  0 siblings, 1 reply; 3+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2022-06-22 13:09 UTC (permalink / raw)
  To: Christopher Baines, 56122

Hello Christopher,

Christopher Baines <mail@cbaines.net> writes:
> 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.

Good catch!  Seems good to me, except for the missing updated copyright
notice at the top.

Best,
-- 
Josselin Poiret




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#56122: [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.
  2022-06-22 13:09 ` Josselin Poiret via Guix-patches via
@ 2022-06-23 12:09   ` Christopher Baines
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Baines @ 2022-06-23 12:09 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 56122-done

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]


Josselin Poiret <dev@jpoiret.xyz> writes:

> Hello Christopher,
>
> Christopher Baines <mail@cbaines.net> writes:
>> 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.
>
> Good catch!  Seems good to me, except for the missing updated copyright
> notice at the top.

Thanks for taking a look. I've pushed this as
8e2ff622ed7e493a644ebcff62299d2ed1c4e806.

I forgot to update the copyright stuff, but I'll try and remember that
for next time.

Thanks again,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-23 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 11:19 [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action Christopher Baines
2022-06-22 13:09 ` Josselin Poiret via Guix-patches via
2022-06-23 12:09   ` bug#56122: " Christopher Baines

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).