Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128703 - [PATCH] Allow to use "eselect kernel set `uname -r`"
Summary: [PATCH] Allow to use "eselect kernel set `uname -r`"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-04-03 15:18 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-04-14 10:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
eselect-1.0.1-kernel-uname-r.patch (eselect-1.0.1-kernel-uname-r.patch,541 bytes, patch)
2006-04-03 15:20 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-03 15:18:46 UTC
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
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-03 15:20:08 UTC
Created attachment 83849 [details, diff]
eselect-1.0.1-kernel-uname-r.patch
Comment 2 Ciaran McCreesh 2006-04-03 15:24:26 UTC
Hardcoding linux? $(uname -s | tr [[:upper:]] [[:lower:]] )-
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-03 15:41:13 UTC
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.
Comment 4 Ciaran McCreesh 2006-04-03 15:51:17 UTC
Ok.
Comment 5 Danny van Dyk (RETIRED) gentoo-dev 2006-04-14 10:43:32 UTC
In SVN and fixed as of eselect-1.0.2