A recent change [1] to dist-kernel_compressed_module_cleanup() in dist-kernel-utils.eclass looks for the kernel config in /lib/modules/${KV_FULL}/source/. To the best of my knowledge, this directory does not exist and the author probably meant /lib/modules/${KV_FULL}/build/ instead. Indeed, making this edit locally fixes the following error: * FAILED postinst: 1 * ERROR: x11-drivers/nvidia-drivers-560.31.02::gentoo failed (postinst phase): * Cannot find kernel config /lib/modules/6.10.3-gentoo-x86_64/source/.config [1]: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=facd2865e403fd295c955fff8d609bfc717aed24
> To the best of my knowledge, this directory does not exist It does on my system, and AFAIK it should always exist. How do you build/install your kernel?
(In reply to Andrew Nowa Ammerlaan from comment #1) > > To the best of my knowledge, this directory does not exist > > It does on my system, and AFAIK it should always exist. > > How do you build/install your kernel? Basically: make make modules_install emerge @module-rebuild make install And that (modules_install, specifically, I'd imagine) results in a build/ symlink to the kernel source. I've never seen a source/ directory, where's that supposed to come from?
> where's that supposed to come from? From modules-install I think
This seems relevant: https://lwn.net/Articles/90689/ There's a mixed-build variable in the Makefile which pointed me that way. I'll keep reading and report back.
Building from inside /usr/src/linux skips the creation of the source symlink. Symlink creation happens in a guarded block: ifdef building_out_of_srctree I think you need to fall back to build if source doesn't exist.
Please let me know if this[1] resolves your problem. [1] https://github.com/gentoo/gentoo/pull/38016
(In reply to Andrew Nowa Ammerlaan from comment #6) > Please let me know if this[1] resolves your problem. > > [1] https://github.com/gentoo/gentoo/pull/38016 Works like a charm. Thanks!
fwiw the source is not even guaranteed to exist in postinst, virtual/linux-sources is just a DEPEND, not IDEPEND and it could be a binpkg installing modules on a system without the sources
(In reply to Ionen Wolkens from comment #8) > fwiw the source is not even guaranteed to exist in postinst, > virtual/linux-sources is just a DEPEND, not IDEPEND and it could be a binpkg > installing modules on a system without the sources aka, it probably at least shouldn't die with the current method, maybe warn at best Not that I really looked at these eclass changes or thought about it, haven't had time.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c75b6bf3c8b84eb3a674613cf054b54b053bbd7c commit c75b6bf3c8b84eb3a674613cf054b54b053bbd7c Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2024-08-08 12:02:35 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2024-08-08 16:44:27 +0000 (dist-)kernel-{install,utils}.eclass: fix finding config during cleanup The source symlink does not exist on all systems. If we can't find any config at all then there will be no preferred suffix which means we fall back to the old '-nt' based cleaning. Closes: https://bugs.gentoo.org/937569 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/38016 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> eclass/dist-kernel-utils.eclass | 18 +++++++++++++++--- eclass/kernel-install.eclass | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-)