Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599 - Need kernel-version detection function or script in ebuilds
Summary: Need kernel-version detection function or script in ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Geert Bevin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 600
  Show dependency tree
 
Reported: 2002-02-08 00:44 UTC by Arcady Genkin
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arcady Genkin 2002-02-08 00:44:28 UTC
Some portages need to know the version of the currently installed kernel (e.g.
nvidia-kernel, alsa-driver).  To avoid code duplication, we need have a function
or a script, accessible in the ebuilds, that would produce the needed value.

I adopted some code from the old nvidia ebuild to take a stab at such a
function.  It can be downloaded from here:

  http://cdf.toronto.edu/~agenkin/kernel_version

I don't have enough experience with the portage system to suggest whether it's
better to keep this as a shell script, or just to yank the function out of it
and put it someplace else.
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-02-08 10:51:16 UTC
Maybe this function could be called "mykernel"?  Dunno.
Comment 2 Arcady Genkin 2002-02-08 10:57:32 UTC
I have no preference.  Actually, I really hate "my*" names, because they are so
microsoftish, but that's totally beyond the point. ;^)
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2002-02-21 01:16:02 UTC
fixed on CVS.  KV is now automatically defined for all ebuilds, and will be set
to "" in the case that there's an error (rather than bombing out, which would be
bad).  Once we have this in a production Portage, developers can simply use $KV
with no other extra special steps.