summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-08-09 17:46:39 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-08-09 17:50:26 +0200
commit5d6d7c6fbacf10a5fbb8d3ea1ab6ec2362ade6f9 (patch)
treea042c8bad6c8bd9f14dcf61fdbb671d19627ac0f /eclass
parentsci-libs/caffe2: update SRC_URI (diff)
downloadgentoo-5d6d7c6fbacf10a5fbb8d3ea1ab6ec2362ade6f9.tar.gz
gentoo-5d6d7c6fbacf10a5fbb8d3ea1ab6ec2362ade6f9.tar.bz2
gentoo-5d6d7c6fbacf10a5fbb8d3ea1ab6ec2362ade6f9.zip
kernel-install.eclass: run depmod after compressing modules
(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 <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-install.eclass3
1 files changed, 3 insertions, 0 deletions
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
}