1 |
On 08/07/2021 02:09, Nikos Chantziaras wrote: |
2 |
> So I just noticed that when I run: |
3 |
> |
4 |
> emerge @module-rebuild |
5 |
> |
6 |
> after having installed a kernel update, the kernel modules of the |
7 |
> previous kernel version are being deleted. I am sure this didn't use to |
8 |
> be the case. |
9 |
Found the issue. On my new system, I had this in my make.conf: |
10 |
|
11 |
UNINSTALL_IGNORE="/usr/src" |
12 |
|
13 |
because /usr/src is a symlink to a directory on my HDD (as I don't want |
14 |
to write all that data to my SSD.) Portage would bark about it during |
15 |
depclean if I don't put that in UNINSTALL_IGNORE. |
16 |
|
17 |
From "man make.conf": |
18 |
|
19 |
UNINSTALL_IGNORE = [space delimited list of fnmatch patterns] |
20 |
|
21 |
This variable prevents uninstallation of files that match |
22 |
specific fnmatch(3) patterns. [...] Defaults to |
23 |
"/lib/modules/*". |
24 |
|
25 |
Right. However, it's obvious I've hit a portage inconsistency here. For |
26 |
example, when I use: |
27 |
|
28 |
CONFIG_PROTECT="blah" |
29 |
|
30 |
in make.conf, "blah" is appended to CONFIG_PROTECT. But for whatever |
31 |
reason, this is not the case for UNINSTALL_IGNORE. It completely nukes |
32 |
the default value instead. I had to change this to: |
33 |
|
34 |
UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src" |
35 |
|
36 |
and now all is fine. |