From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 60FEE159C9B for ; Fri, 9 Aug 2024 15:49:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8F552BC06D; Fri, 9 Aug 2024 15:49:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5E2962BC01E for ; Fri, 9 Aug 2024 15:49:39 +0000 (UTC) From: Andrew Ammerlaan To: gentoo-dev@lists.gentoo.org Cc: Andrew Ammerlaan Subject: [gentoo-dev] [PATCH] kernel-install.eclass: run depmod after compressing modules Date: Fri, 9 Aug 2024 17:49:27 +0200 Message-ID: <20240809154927.347120-1-andrewammerlaan@gentoo.org> X-Mailer: git-send-email 2.45.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 3544eb9b-09a5-4fe1-9388-a328afc2d3cb X-Archives-Hash: 42cfe1c1de7203d92961da404ad8309b (de)compressing modules changes the path of the module files so we need to run depmod to ensure that tools such as modprobe/modinfo work. Note that depmod is often, but *not* always, run by sys-kernel/installkernel. Systemd installs a hook to do this, but there is no equivalent on openrc systems. So instead just ensure that the tree of modules we install is consistent here in the eclass. Signed-off-by: Andrew Ammerlaan --- eclass/kernel-install.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 496e258815d2..930640188c26 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -796,6 +796,9 @@ kernel-install_compress_modules() { find "${ED}/lib/modules/${KV_FULL}" -name '*.ko' -print0 | xargs -0 -P "$(makeopts_jobs)" -n 128 "${compress[@]}" assert "Compressing kernel modules failed" + + # Module paths have changed, run depmod + depmod --all --basedir "${ED}" ${KV_FULL} || die fi } -- 2.45.2