Skip to Content.
Sympa Menu

sm-grimoire-bugs - [SM-Grimoire-Bugs] [Bug 10940] get_kernel_version isn't flexible enough

sm-grimoire-bugs AT lists.ibiblio.org

Subject: SourceMage Grimoire Bug List

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-grimoire-bugs AT lists.ibiblio.org
  • Subject: [SM-Grimoire-Bugs] [Bug 10940] get_kernel_version isn't flexible enough
  • Date: 17 Oct 2006 08:00:08 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=10940





------- Additional Comments From iuso AT sourcemage.org 2006-10-17 03:00 -------
(In reply to comment #7)
> Please check the current get_kernel_version that is in test
> It appropriately checks version from /usr/src/linux/.config
> If you properly create your /usr/src/linux link for your not cast kernel,
> it
> will cast your modules for the right kernel
> This allows updating of ndiswrapper for example BEFORE reboot (old
> behaviour
> was using uname -r as falback only)
> all those variables seem like a good idea, but a proper /usr/src/linux link
> seems to do the trick.
>
> Do we need more? Am i missing something?

Yes, you're missing this:

local KVER=$(installed_version linux)
if [[ $KVER ]] ; then
echo $KVER
else

That's how get_kernel_version begins. And it means that if you have the linux
spell installed, it is always checked first. You can't cast against any other
kernel as long as linux is there. So ironically the problem now, after moving
away from the plain 'uname -r', is that you can't just get the 'uname -r'
version without dispeling linux.

This behavior is what we're looking to be able to override, which is what the
OVERRIDE_KERNEL_CONFIG variable (not "all those variables", as you put it :))
would accomplish. In addition to being completely transparent to
spellwriters,
the actual function code itself wouldn't be anything more than:

if [[ $OVERRIDE_KERNEL_VERSION ]] ; then
echo $OVERRIDE_KERNEL_VERSION
else

We can just add that to the top of the function and be done with it. :)


--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page