On Sun, 14 May 2017 02:05:58 +0100, lee wrote: > > It will only remove things that it deems not needed. Usually these are > > packages that have just been upgraded. > > Yes, the sources wouldn't be needed if I had upgraded the kernel. Still > one might expect it to figure out which kernel is in use and to not try > to delete it --- that would make some sense.
This is Gentoo, you have to make most of the decisions yourself. You don't necessarily need the sources for the running kernel. > > For kernel sources, tell portage to not remove it: > > > > `emerge --noreplace sys-kernel/gentoo-sources:4.4.52` > > > > as an example. > > > > If you do that, --depclean will not remove the sources for 4.4.52 (as > > an example.) > > Thanks, I couldn't find an option like this. It's in the emerge man page. Alternatively, you can create a set that ensures no kernel sources are ever depcleaned. Add this to /etc/portage/sets.conf [kernels] class = portage.sets.dbapi.OwnerSet world-candidate = False files = /usr/src and add the kernels set to world with this emerge -n @kernels Now any kernel sources you install will not be removed until you specifically instruct portage to do so. > It worked --- now some time when I do upgrade the kernel, I somehow need > to remove these sources from the world list, I guess ... They will be removed when you manually unmerge the kernel emerge -Ca \=sys-kernel/gentoo-sources:4.4.52 -- Neil Bothwick The sergeant walked into the shower and caught me giving myself a dishonorable discharge. Without missing a beat, I said, "It's my dick and I can wash it as fast as I want!"
pgpEFg5WIq8_f.pgp
Description: OpenPGP digital signature