summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-05-30 12:10:02 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-05-30 13:11:03 -0400
commita85a408aa9f9d442f4c35b4620a341a8719ea318 (patch)
tree56f8c600f99954a00187a76f97398249884ecc42 /eclass
parentx11-drivers/nvidia-drivers: drop modules dir rename comment (diff)
downloadgentoo-a85a408aa9f9d442f4c35b4620a341a8719ea318.tar.gz
gentoo-a85a408aa9f9d442f4c35b4620a341a8719ea318.tar.bz2
gentoo-a85a408aa9f9d442f4c35b4620a341a8719ea318.zip
linux-mod-r1.eclass: warn about install-dir renames in eclassdocs
Not an issue when people upgrade their kernel regularly but, if keeping same kernel forever, may end up with stale modules if change the location. The eclass' default change has little impact given very few ebuilds actually did not specify the directory, but suggesting s/misc/extra/ may not be wise. This is also an issue when different-named modules are added or removed (e.g. xtables-addons has optional modules). Worse if user changes or enables compression given all old modules will stay with their old extension. With some modules this may have a bigger impact if api changes or the userland does version checks, and it ends up loading the wrong module. For most others, will likely go unnoticed and fix itself with a kernel upgrade. Changes may require having a pkg_postinst cleanup at times. ...ideal would be if package manager could clean modules if they are being installed for the same kernel, but keep the ones for a different (old) kernel, but well. For eclass solutions there could(?) be: 1. sanity check that warn if duplicates are found in postinst (informational only, being destructive there sounds bad) 2. install depmod.d files that gives priority to the modules we just installed (untested, but sounds possible) Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-mod-r1.eclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 73e7e7f8ff0b..d665c42f9dd8 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -22,7 +22,6 @@
# - try without :target first, it is now almost always unnecessary
# - srcdir defaults to the current directory, and note that paths
# can be relative to that (should typically *not* pass ${S})
-# - "name(misc)" or "(extra)" are fine just as modlist=( name )
# 2. BUILD_PARAMS and/or BUILD_FIXES
# -> local modargs=( VAR="${KV_OUT_DIR}" ... )
# - CC/LD and similar are unneeded, always passed (V=1 too)
@@ -336,6 +335,10 @@ linux-mod-r1_pkg_setup() {
# exists, but it can be anything.
# -> Default: extra
#
+# Warning: Changing this location may leave stale modules until a
+# kernel upgrade as the package manager does not typically delete
+# old modules and only does overwrite on rebuilds.
+#
# > source-dir: Directory containing the Makefile to build the module.
# Path can be relative to the current directory or absolute.
# -> Default: current directory