On Tue, Dec 19, 2017 at 8:15 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
On Tue, 19 Dec 2017 16:51:27 +1100, Adam Carter wrote:

> When i depclean i use -av --depclean --exclude gcc --exclude
> gentoo-sources, since i like keep 2 gcc's around and I look after
> sources manually.

You can prevent depclean from removing gcc and kernel like this

% cat /etc/portage/sets.conf
[kernels]
class = portage.sets.dbapi.OwnerSet
world-candidate = False
files = /usr/src

[gcc]
class = portage.sets.dbapi.OwnerSet
world-candidate = False
files = /usr/x86_64-pc-linux-gnu/gcc-bin

Then add @kernels and @gcc to world_sets. I do this and now those
packages have to be unmerged manually.

Nice. I feel like i should look into that an learn more about Gentoo, but then;

alias depclean="emerge -av --depclean --exclude gcc --exclude gentoo-sources"

And the motivation is gone.