From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CPZlNy9SHWLZZgEAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 23:52:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iP/oNC9SHWK5CAEA9RJhRA (envelope-from ) for ; Mon, 28 Feb 2022 23:52:31 +0100 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 A44BE21D29 for ; Mon, 28 Feb 2022 23:52:30 +0100 (CET) Received: from localhost ([::1]:45936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOosX-0006Bb-Ft for larch@yhetil.org; Mon, 28 Feb 2022 17:52:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOos7-00069x-AO for bug-guix@gnu.org; Mon, 28 Feb 2022 17:52:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOos6-0000gd-RG for bug-guix@gnu.org; Mon, 28 Feb 2022 17:52:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOos6-0008Cy-OA for bug-guix@gnu.org; Mon, 28 Feb 2022 17:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#40998: [PATCH 2/4] system: Streamline operating-system-boot-parameters-file a bit. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 28 Feb 2022 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40998 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 40998@debbugs.gnu.org Received: via spool by 40998-submit@debbugs.gnu.org id=B40998.164608869131497 (code B ref 40998); Mon, 28 Feb 2022 22:52:02 +0000 Received: (at 40998) by debbugs.gnu.org; 28 Feb 2022 22:51:31 +0000 Received: from localhost ([127.0.0.1]:34944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOora-0008Bx-MV for submit@debbugs.gnu.org; Mon, 28 Feb 2022 17:51:30 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:45581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOorZ-0008Bc-E3 for 40998@debbugs.gnu.org; Mon, 28 Feb 2022 17:51:29 -0500 Received: by mail-qk1-f174.google.com with SMTP id b13so11591504qkj.12 for <40998@debbugs.gnu.org>; Mon, 28 Feb 2022 14:51:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AGmL0W514zYf6GQCHP20wQp9hvVfxiBtZg8Drf3qLMU=; b=R06sTgciEXbgzI/A98tJf2/xEKZHoh25rqAj4KzjaMft2QWjiJ6rl5W3yr2GW4pNj7 Mq4nwuZTsLtGJ68Jc29lmK7fFGRbqqkeGs+uvrnfXxESdUeee3hUv3FzWtTqXJvWFUne R7KvdD66cqUxecAxnb7mD1HpeO+pqdvBX0cdJNmce9wJIfghMcGTeWqWWoghRD2q4rgh 0Dr/51RZOOFERmMgwWaSsMOPN2rglLurjqvgr9M25uwUduRcMtR7S9oTehlKBS4XwsPA RBlVcxbud6RetbyCbEQsU1MckBGIAyYcA6PMM62DIB7HhijQISr7I9nQ00QNU+RJotdR 8FJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AGmL0W514zYf6GQCHP20wQp9hvVfxiBtZg8Drf3qLMU=; b=xDkDqXT2aMwwNMvcLoXu4PyWZ9liNS1TdaevFcCxOdErTIHR6AYlgg8ucZhqZRn0ay umFYnLzs8QttAZtm7oqr3SgcJl+JPhb1tEnWR8+atg2MFjyTS5l0+JwMW8sCtmAyNjoC ZF+QfLVFs4aQyMSEcuKIfcq/BaJLP0n7Dtc6wwcnWUciDUGjiBGLxTUcxDJ4KttJaXaA t7AXRFaXXqMNFo0XYdPYkaOXPjl8a38kDb8soET69uhlV/gB8ooPdLbL/ribIXQq7pVc vlP8so1OrimoBJ6WH3nVWr86w5MRYlaUM5Yd0JbLGLevmZd/pZAK/PjOAGIUz49QV5Z8 RhwA== X-Gm-Message-State: AOAM530EMIpNb3KHMMNsshYJGnHrEsw3wDflKqnDo0ayiNVkkjorqW7J uAaXCQhyaqaJwhOUyHKUYUcott/aHKU28g== X-Google-Smtp-Source: ABdhPJyQ1CkJmeoJGFUH8st6B4CtdECgXUz4JaMFKdKIeYI1UxyzPlQsx7ovQTV5+1w/5Ji/Y+mCxA== X-Received: by 2002:a37:5d4:0:b0:508:18c2:30c1 with SMTP id 203-20020a3705d4000000b0050818c230c1mr12334446qkf.376.1646088683687; Mon, 28 Feb 2022 14:51:23 -0800 (PST) Received: from localhost.localdomain (dsl-141-227.b2b2c.ca. [66.158.141.227]) by smtp.gmail.com with ESMTPSA id b17-20020ae9eb11000000b0064917bda713sm5562714qkg.85.2022.02.28.14.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 14:51:23 -0800 (PST) From: Maxim Cournoyer Date: Mon, 28 Feb 2022 17:50:44 -0500 Message-Id: <20220228225047.11105-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220228225047.11105-1-maxim.cournoyer@gmail.com> References: <20220228225047.11105-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646088750; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AGmL0W514zYf6GQCHP20wQp9hvVfxiBtZg8Drf3qLMU=; b=rbfk3jp4otzI4dkmtAo+dHxwnyLj8akLkxLcch4KRYExi4ADxsZJk4YyYhFzdIQmh0rCqG oZ/XAjTuaHLA9fu4EkYBWkXeVVvTn/75PnaX7eVY0QOG4XTYx91gXTq5qRoOP+aAgyYjpL XiDqCT7tt73Eyw8HGXWG6x63ZcgbD0+Y2NqZX+aOn+xlChFVhU8B70d8gJU0W2maRV7uAb sKFVbkG0z14A3NP245utseUA8Qnhqru8SNuOUHaiN7bDyROypxxB4XzWTC6t+6kk4wYqot z/mxoAVDJAyMLFP6p30rSBnM+czBXW5mD5NQiMnxIhe+p+CWaHxnKYMe4OZ4BQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646088750; a=rsa-sha256; cv=none; b=s7efCgZh78ZTM4AKpE4VRJqw48WTM/3a3KhiGkVYjVq/80u9BQSUwtnJY34CCCadTyApt7 cWGPms0CgYgtWjBrKK+XdMHQLkvMq/rjBDNTS1TyvospNOTYrseEzpTP0JGsnpDkMhsJKq V/dJjMicRAGZ+2R+bfNxZOD3+NuyTptt+R2LSDHl2xeAUvZfBwc8kHuw5F4XTOsq+rarOS kuKvLEapFqZ4lW8RVplEPn6jhaIrb7oWZX8ystGLsvWMqAoKkTBj9xlf9ZCIuBZIw0bx+1 UzomqDjcBUUIlB4qVxCzuiJIG7hyrFYUdZdcPWun7WlIdxLrda3gzZ0v531tDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=R06sTgci; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=R06sTgci; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A44BE21D29 X-Spam-Score: 5.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: SZ85cIpTAVqb * gnu/system.scm (operating-system-boot-parameters-file) [SYSTEM-KERNEL-ARGUMENTS?]: Remove unused argument (it had no callers) and adjust doc, moving the self-referential tip to... * gnu/system.scm (operating-system-boot-parameters): ... here, reworded for clarity. Suggested-by: Ludovic Courtès --- gnu/system.scm | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 9ae158dea6..c6c46343cc 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1453,7 +1453,10 @@ (define* (operating-system-boot-parameters os root-device #:key system-kernel-arguments?) "Return a monadic record that describes the boot parameters of OS. When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments -such as '--root' and '--load' to ." +such as '--root' and '--load' to . The +SYSTEM-KERNEL-ARGUMENTS? should only be used in necessity, as the '--load' and +'--system' values are self-referential (they refer to the system), thus +susceptible to introduce a cyclic dependency." (let* ((initrd (and (not (operating-system-hurd os)) (operating-system-initrd-file os))) (store (operating-system-store-file-system os)) @@ -1494,22 +1497,13 @@ (define (device->sexp device) (_ device))) -(define* (operating-system-boot-parameters-file os - #:key system-kernel-arguments?) - "Return a file that describes the boot parameters of OS. The primary use of -this file is the reconstruction of GRUB menu entries for old configurations. - -When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments such as '--root' -and '--load' to the returned file (since the returned file is then usually -stored into the content-addressed \"system\" directory, it's usually not a -good idea to give it because the content hash would change by the content hash -being stored into the \"parameters\" file)." +(define* (operating-system-boot-parameters-file os) + "Return a file that describes the boot parameters of OS. The primary use +of this file is the reconstruction of GRUB menu entries for old +configurations." (let* ((root (operating-system-root-file-system os)) (device (file-system-device root)) - (params (operating-system-boot-parameters - os device - #:system-kernel-arguments? - system-kernel-arguments?))) + (params (operating-system-boot-parameters os device))) (scheme-file "parameters" #~(boot-parameters (version #$(boot-parameters-version params)) -- 2.34.0