[PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.

  • Done
  • quality assurance status badge
Details
2 participants
  • Josselin Poiret
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 3 years ago
(address . guix-patches@gnu.org)
20220621111900.9229-1-mail@cbaines.net
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
Josselin Poiret wrote 3 years ago
87bkuku9o0.fsf@jpoiret.xyz
Hello Christopher,

Christopher Baines <mail@cbaines.net> writes:
Toggle quote (5 lines)
> 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
Christopher Baines wrote 3 years ago
(name . Josselin Poiret)(address . dev@jpoiret.xyz)(address . 56122-done@debbugs.gnu.org)
87czezmvhe.fsf@cbaines.net
Josselin Poiret <dev@jpoiret.xyz> writes:

Toggle quote (11 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmK0WB1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe+uQ//SeWLmvanheyuvi8VpCXyC2ryyjIeTpbM
ufF/90ihl/Rk3aU49MVqaCQDk0gyCtSZZj/XGwioWiwsqkGUuutJvZNXYxlbrMS5
gNZ2sDbgh4ctIT1/x7WfPVVpTgo90PgWB33yy2T6RUNtWMtmXX34R3h4v3AoSu8R
uetIq9M22i0k7m8wIqDam14CEKOMFeo9KrH1l3nYPcZtqiOk6J7BC5OhrzkyVsIX
Yj5VN6j582t6BDTAIueNyniul5bdTU7d/4NR+Lb9hO2ASH1m/rNbxww3OAxTjXrw
f4QJ5qhXYsiU5RHJdZg/8n8PuHCDt9zo3iUBL0BykkseZiWeXH7mPYjcW6Mt81en
2JAxYdT5d55B/03nZCqM8r31LcsYHJgguqadeZ10XS/zeQ5eeuJP3CMT2Q/Zrn+6
jmuaWQ1zcvybTPfoTYbXzkcQiK1X2vdv5bQnx4AW6m/whPH3gFlN0djO7aHy3548
OpdPwGrye+cTickFs1d4g0V9SNRHdNUJXaRNh08wpNQixPaXlj3BSElRY3BD0ATd
vej83IV7rc6PFMUhuckRg5gwFtLQa8AInVuJFL0qjrXd6RPF3yeZG2dZjF1T4F7c
mTtrZ/pze+SOA8AYGfcASN78EIc6YEhkQM1lXAm5XR3fXVYXO299SPxgZd7ojvC1
kkriLFexVf4=
=gEwE
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 56122@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 56122
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help