From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CHamDXapsWIspAAAbAwnHQ (envelope-from ) for ; Tue, 21 Jun 2022 13:20:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MIl/DXapsWIvGgEAauVa8A (envelope-from ) for ; Tue, 21 Jun 2022 13:20:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D98FCA236 for ; Tue, 21 Jun 2022 13:20:21 +0200 (CEST) Received: from localhost ([::1]:36236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3bvh-0007AG-11 for larch@yhetil.org; Tue, 21 Jun 2022 07:20:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3bvO-00077i-7o for guix-patches@gnu.org; Tue, 21 Jun 2022 07:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3bvN-0006FE-Uh for guix-patches@gnu.org; Tue, 21 Jun 2022 07:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3bvN-0005Te-OY for guix-patches@gnu.org; Tue, 21 Jun 2022 07:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56122] [PATCH] guix system: Inline menu-entries in to bootcfg in perform-action. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jun 2022 11:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56122 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56122@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165581034820983 (code B ref -1); Tue, 21 Jun 2022 11:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jun 2022 11:19:08 +0000 Received: from localhost ([127.0.0.1]:59249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3buV-0005SN-SY for submit@debbugs.gnu.org; Tue, 21 Jun 2022 07:19:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:42470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3buU-0005SF-Il for submit@debbugs.gnu.org; Tue, 21 Jun 2022 07:19:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3buU-0006HT-6V for guix-patches@gnu.org; Tue, 21 Jun 2022 07:19:06 -0400 Received: from mira.cbaines.net ([212.71.252.8]:36388) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3buS-0006BZ-7o for guix-patches@gnu.org; Tue, 21 Jun 2022 07:19:05 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id 9FDB227BBE9 for ; Tue, 21 Jun 2022 12:19:01 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 8f20f767 for ; Tue, 21 Jun 2022 11:19:00 +0000 (UTC) From: Christopher Baines Date: Tue, 21 Jun 2022 12:19:00 +0100 Message-Id: <20220621111900.9229-1-mail@cbaines.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655810421; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=oAeBD+sPwqf6/JRht2QvfR5hNGIQ9ZOsnPQbhqOpcsc=; b=WeWmZbzGxMtT6rk0jiKYIfQUYtmhz8MiBhZiSwZyCHtuElcFO2O/GXUUtlPNdHfRMZUsHq X/6FoVs63RhscpxADCRXmrNXN4Y+AA3MVZmJboBdWiQH/2YtsX/YOhoMGZozdcxILjAe1q 1nNu0bwGCPSwegXI55tlWClOqR3bYJR0A5gmz73nMUwKsAB6W1sdxwtd2tMOV/A1Hi5GlT aIUnWvybKXDTUrwTdBfJOQn1QUmkazscZ3miy7kZv3kYTQt9O0oKKFfiFsmF1/ocRJclqC w+9k9fWyfCp67g3ezOPypITHzUE+sTQysGvt5LoMVyh7RiGd4Ct/0OU0H9+Bag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655810421; a=rsa-sha256; cv=none; b=Lmtvf0FjksyiIjMlmh0bo+iCxgZOGZHsEm2aa9rBzVUkt2+jZD/kMEn3RqOtXnE+Njaa+e hpXbRMxsCqOxdN9YqjhCRSdsf2EJyq9hEXcy2bMtp8kGiDBT6A1JjR3KeKA5ngzwe3wLy2 p5Tfb7MLUK0Z7mWc/u53KvE7W/+//Fhnq+dQLBIghI0J4HFon+juiELJk4mX/18md1+RHU 0usq9ewxkbyrnoCkCVQpTQ/767ic7Y6IU7CUGPK0K4tNAgB3CULcrE9ppNz/+X3rOG5Efr a8DP0BVpvHB+sfFzpY4lfhXahgaRr/X8s1GaDY0nGT7hqGQLd/SKc9+9xEaMYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.67 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D98FCA236 X-Spam-Score: -1.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: Fy+jrG5Jk2U3 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