unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 40998@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#40998: [PATCH 2/4] system: Streamline operating-system-boot-parameters-file a bit.
Date: Mon, 28 Feb 2022 17:50:44 -0500	[thread overview]
Message-ID: <20220228225047.11105-2-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20220228225047.11105-1-maxim.cournoyer@gmail.com>

* 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 <ludo@gnu.org>
---
 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 <boot-parameters> record that describes the boot
 parameters of OS.  When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments
-such as '--root' and '--load' to <boot-parameters>."
+such as '--root' and '--load' to <boot-parameters>.  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





  reply	other threads:[~2022-02-28 22:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <handler.40998.B40998.164608474925197@debbugs.gnu.org>
2022-02-28 22:50 ` bug#40998: [PATCH 1/4] system: Add a version field to the <boot-parameters> record Maxim Cournoyer
2022-02-28 22:50   ` Maxim Cournoyer [this message]
2022-03-01  9:17     ` bug#40998: [PATCH 2/4] system: Streamline operating-system-boot-parameters-file a bit Ludovic Courtès
2022-02-28 22:50   ` bug#40998: [PATCH 3/4] initrd: Use non-hyphenated kernel command-line parameter names Maxim Cournoyer
2022-02-28 22:50   ` bug#40998: [PATCH 4/4] initrd: Honor rootfstype and rootflags command-line parameters Maxim Cournoyer
2022-03-01  9:16   ` bug#40998: [PATCH 1/4] system: Add a version field to the <boot-parameters> record Ludovic Courtès
2022-03-01 14:40     ` Maxim Cournoyer
2022-03-01 18:32       ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228225047.11105-2-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=40998@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).