The attached patch allows to specify only the kernel version rather than either the number or the whole directory name for the kernel to set the link to. This makes quicker to set the kernel to the current version for example when going to build modules for the running kernel. (much more intuitive to do eselect kernel set `uname -r` instead of eselect kernel set linux-`uname -r`). HTH, Diego
Created attachment 83849 [details, diff] eselect-1.0.1-kernel-uname-r.patch
Hardcoding linux? $(uname -s | tr [[:upper:]] [[:lower:]] )-
Consider that kernel eselect module already hardcodes linux as destination directory's name. Also, all of the BSD I know of saves the kernel sources in /usr/src/sys, not lowercase `uname -s`. Also, at least for FreeBSD we use a two-stage linking, example: sys -> sys-6.0-r1 sys-6.0 -> sys-6.0-r1 sys-6.0-r0 sys-6.0-r1 sys-6.1 -> sys-6.1-r0 sys-6.1-r0 This because of the way sys-${RV} is used during build. This makes kernel eselect module about useless on Gentoo/*BSD as it is, and a rewrite is probably an overkill atm. Of course if you feel right making it work fine, go on.. I think for this time hardcoding linux once more when it's already hardcoded is not going to disrupt anything.
Ok.
In SVN and fixed as of eselect-1.0.2