(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>
---
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
}
On Fri, 2024-08-09 at 17:49 +0200, Andrew Ammerlaan wrote:
(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>
---
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
}
Are you actually supposed to run it on ED and not EROOT?
Won't that
cause file collisions (even if we circumvent them via CONFIG_PROTECT).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 11:04:57 |
Calls: | 10,389 |
Calls today: | 4 |
Files: | 14,061 |
Messages: | 6,416,857 |
Posted today: | 1 |