Kai Peter wrote: > On 2019-06-20 20:10, Dale wrote: >> Kai Peter wrote: >>>> >>>> The bad thing about this, sometimes I have to use exclude >>>> gentoo-sources >>>> from things such as --depclean. It's annoying but it's the only way I >>>> could come up with to do this. >>>> >>> You can do an 'emerge --noreplace' - one time. >>> >> >> >> I read the man page for this option, I'm not sure how it would help. >> All that does is prevent it from recording that it is installed in the >> world file. Since I have -1 set as a default, it does that when I >> emerge single packages already. If I want to keep it and it not be >> --depcleaned, then I use -n --select y to add it to the world file. >> Thing is, some packages require some sort of kernel to be installed as a >> dependency last I checked. >> >> Or am I missing something? >> >> Dale >> >> :-) :-) > It is just to exclude a gentoo-sources version from depclean. I > assumed you do something like this: > > $> emerge -c --exclude=gentoo-sources:4.14.83 > > and may be multiple times. With --noreplace the corresponding version > will be omitted, so a simple 'emerge -c' would be enough. > > Anyway, I did struggle with this gentoo-sources thing a long time ago. > I want to have the latest stable (minor) version (patch) of the > running kernel installed as well the newest stable one. As long as it > is not compiled and booted is uses only some disk space. If I have > compiled the kernel I use e.g. 'emerge --noreplace > gentoo-sources:4.14.83' to keep it. > > To get the latest patch version I have ...package.mask/gentoo-sources. > For the latest stable sources I remove the file and re-create it > afterwards. This is done by a cron job automatically. A little bit > like this ('gentoo-sources' contains: ">=sys-kernel/gentoo-sources-4.15") > > FN="${PORTAGE_CONFIGROOT}/etc/portage/package.mask/gentoo-sources" > emerge -u gentoo-sources > TMP=`cat $FN` > rm -f $FN > emerge -u gentoo-sources > echo $TMP > $FN > > Just my way. To me it is important to have a high level of automation. > With automation it is unimportant how many gentoo-sources kernels are > installed. I remove obsolete ones periodically by hand. > > Kai
When I do --depclean, I just add --exclude gentoo-sources and it ignores all versions of it. I only have to type it once that way. I do have a few versions installed, one running plus a couple backups that are well tested. At the moment, I have one that I haven't booted yet. I thought a storm last night might give me that opportunity but the power held up fine. It sounds like you do something similar to me but you just automate it more. Since I do update only a couple times a year at most, it's not a big deal. I generally only run --depclean after a major KDE upgrade, about once every 4 to 6 weeks. Dale :-) :-)