all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 69400@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>,
	Leo Famulari <leo@famulari.name>,
	Tobias Geerinckx-Rice <me@tobias.gr>, Wilko Meyer <w@wmeyer.eu>
Subject: [bug#69400] [PATCH] linux-initrd: Avoid looking up builtin modules.
Date: Mon, 26 Feb 2024 14:06:23 +0800	[thread overview]
Message-ID: <7256f0ce334fc064a904e6d9748e9ccc7e67dfda.1708926797.git.hako@ultrarare.space> (raw)

* gnu/system/linux-initrd.scm (flat-linux-module-directory)
[build-exp]<builtin-modules,modules-to-lookup>: New variables.
<modules>: Use ‘modules-to-lookup’ to avoid looking up builtin modules.

Change-Id: I60fdae0211bb6632508b1c63582e013e78186cd1
---
 gnu/system/linux-initrd.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 5847f52a37..25563b703f 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -132,15 +132,27 @@ (define (flat-linux-module-directory linux modules)
         #~(begin
             (use-modules (gnu build linux-modules)
                          (guix build utils)
+                         (rnrs io ports)
                          (srfi srfi-1)
                          (srfi srfi-26))

             (define module-dir
               (string-append #$linux "/lib/modules"))

+            (define builtin-modules
+              (call-with-input-file
+                  (first (find-files module-dir "modules.builtin$"))
+                (lambda (port)
+                  (map file-name->module-name
+                       (string-tokenize
+                        (get-string-all port))))))
+
+            (define modules-to-lookup
+              (lset-difference string=? '#$modules builtin-modules))
+
             (define modules
               (let* ((lookup  (cut find-module-file module-dir <>))
-                     (modules (map lookup '#$modules)))
+                     (modules (map lookup modules-to-lookup)))
                 (append modules
                         (recursive-module-dependencies
                          modules

base-commit: b25b94335a3ee8d68d2145da8e5ea0325ecea451
prerequisite-patch-id: c615f2b08070db6cbe847a2bdd5b7c0aae79789b
prerequisite-patch-id: fd7da036342f36a8c698f5c8975f9e48d3ade435
prerequisite-patch-id: a2c81c14423bb9858f33d7d26976e8eea61982b7
prerequisite-patch-id: e30fd25b1dc4aaaff76474153836cd48e8565eb9
prerequisite-patch-id: 1d070b26dc64ee2ec95f14c4f5fc23419f766810
prerequisite-patch-id: 03de992f0312d5f0ee3368ebc3c1fad7c955d095
prerequisite-patch-id: b330efe2b0713e30b766c3b84643df67eb1eae5d
prerequisite-patch-id: a233d53e8895d3f82af872fffb2e3858f44ceb23
prerequisite-patch-id: a2b6bd60bc05d7b5a75f15a06b1b614afd6a7033
prerequisite-patch-id: f2a0189de95456f15ec6a92526c72fbedb74f359
--
2.41.0




             reply	other threads:[~2024-02-26  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  6:06 Hilton Chain via Guix-patches via [this message]
2024-03-06 22:21 ` [bug#69400] [PATCH] linux-initrd: Avoid looking up builtin modules Ludovic Courtès
2024-03-09  3:17   ` bug#69400: " Hilton Chain via Guix-patches via

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

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

  git send-email \
    --in-reply-to=7256f0ce334fc064a904e6d9748e9ccc7e67dfda.1708926797.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=69400@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    --cc=leo@famulari.name \
    --cc=me@tobias.gr \
    --cc=w@wmeyer.eu \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.