GNU bug report logs - #56122
[PATCH] guix system: Inline menu-entries in to bootcfg in perform-action.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Tue, 21 Jun 2022 11:20:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56122 in the body.
You can then email your comments to 56122 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#56122; Package guix-patches. (Tue, 21 Jun 2022 11:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 21 Jun 2022 11:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] guix system: Inline menu-entries in to bootcfg in
 perform-action.
Date: Tue, 21 Jun 2022 12:19:00 +0100
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





Information forwarded to guix-patches <at> gnu.org:
bug#56122; Package guix-patches. (Wed, 22 Jun 2022 13:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 56122 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Christopher Baines <mail <at> cbaines.net>, 56122 <at> debbugs.gnu.org
Subject: Re: [bug#56122] [PATCH] guix system: Inline menu-entries in to
 bootcfg in perform-action.
Date: Wed, 22 Jun 2022 15:09:35 +0200
Hello Christopher,

Christopher Baines <mail <at> 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




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 23 Jun 2022 12:11:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Thu, 23 Jun 2022 12:11:02 GMT) Full text and rfc822 format available.

Message #13 received at 56122-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 56122-done <at> debbugs.gnu.org
Subject: Re: [bug#56122] [PATCH] guix system: Inline menu-entries in to
 bootcfg in perform-action.
Date: Thu, 23 Jun 2022 13:09:27 +0100
[Message part 1 (text/plain, inline)]
Josselin Poiret <dev <at> jpoiret.xyz> writes:

> Hello Christopher,
>
> Christopher Baines <mail <at> 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
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Jul 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.