On 08/07/2021 02:09, Nikos Chantziaras wrote:
So I just noticed that when I run:emerge @module-rebuildafter having installed a kernel update, the kernel modules of the previous kernel version are being deleted. I am sure this didn't use to be the case.
Found the issue. On my new system, I had this in my make.conf: UNINSTALL_IGNORE="/usr/src"because /usr/src is a symlink to a directory on my HDD (as I don't want to write all that data to my SSD.) Portage would bark about it during depclean if I don't put that in UNINSTALL_IGNORE.
From "man make.conf": UNINSTALL_IGNORE = [space delimited list of fnmatch patterns] This variable prevents uninstallation of files that match specific fnmatch(3) patterns. [...] Defaults to "/lib/modules/*".Right. However, it's obvious I've hit a portage inconsistency here. For example, when I use:
CONFIG_PROTECT="blah"in make.conf, "blah" is appended to CONFIG_PROTECT. But for whatever reason, this is not the case for UNINSTALL_IGNORE. It completely nukes the default value instead. I had to change this to:
UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src"
and now all is fine.

