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

bugzilla-daemon at bugs.sourcemage.org bugzilla-daemon at bugs.sourcemage.org
Tue Oct 17 04:00:08 EDT 2006


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.



More information about the SM-Grimoire-Bugs mailing list