1 |
On Sun, 14 May 2017 02:05:58 +0100, lee wrote: |
2 |
|
3 |
> > It will only remove things that it deems not needed. Usually these are |
4 |
> > packages that have just been upgraded. |
5 |
> |
6 |
> Yes, the sources wouldn't be needed if I had upgraded the kernel. Still |
7 |
> one might expect it to figure out which kernel is in use and to not try |
8 |
> to delete it --- that would make some sense. |
9 |
|
10 |
This is Gentoo, you have to make most of the decisions yourself. You |
11 |
don't necessarily need the sources for the running kernel. |
12 |
|
13 |
> > For kernel sources, tell portage to not remove it: |
14 |
> > |
15 |
> > `emerge --noreplace sys-kernel/gentoo-sources:4.4.52` |
16 |
> > |
17 |
> > as an example. |
18 |
> > |
19 |
> > If you do that, --depclean will not remove the sources for 4.4.52 (as |
20 |
> > an example.) |
21 |
> |
22 |
> Thanks, I couldn't find an option like this. |
23 |
|
24 |
It's in the emerge man page. |
25 |
|
26 |
Alternatively, you can create a set that ensures no kernel sources are |
27 |
ever depcleaned. Add this to /etc/portage/sets.conf |
28 |
|
29 |
[kernels] |
30 |
class = portage.sets.dbapi.OwnerSet |
31 |
world-candidate = False |
32 |
files = /usr/src |
33 |
|
34 |
and add the kernels set to world with this |
35 |
|
36 |
emerge -n @kernels |
37 |
|
38 |
Now any kernel sources you install will not be removed until you |
39 |
specifically instruct portage to do so. |
40 |
|
41 |
> It worked --- now some time when I do upgrade the kernel, I somehow need |
42 |
> to remove these sources from the world list, I guess ... |
43 |
|
44 |
They will be removed when you manually unmerge the kernel |
45 |
|
46 |
emerge -Ca \=sys-kernel/gentoo-sources:4.4.52 |
47 |
|
48 |
|
49 |
-- |
50 |
Neil Bothwick |
51 |
|
52 |
The sergeant walked into the shower and caught me giving myself a |
53 |
dishonorable discharge. Without missing a beat, I said, "It's my dick |
54 |
and I can wash it as fast as I want!" |