FS#7150 - Adding kernel version as dep to module related packages (fglrx , madwifi etc)
Attached to Project:
Arch Linux
Opened by Lone_Wolf (Lone_Wolf) - Sunday, 13 May 2007, 13:17 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 26 January 2008, 16:04 GMT
Opened by Lone_Wolf (Lone_Wolf) - Sunday, 13 May 2007, 13:17 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 26 January 2008, 16:04 GMT
|
Details
Due to problems with kernel 2.6.21 , i have to use kernel
2.6.20 on my laptop. (see flyspray 7124).
This also means i can't upgrade packages that are built against the newest kernel, like fglrx and madwifi. (nvidia will probably have he same issue) I propose to include the specific kernel version packages are built against in the pkgbuild. |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Saturday, 26 January 2008, 16:04 GMT
Reason for closing: Implemented
Saturday, 26 January 2008, 16:04 GMT
Reason for closing: Implemented
- You have to figure out yourself which packages are kernel related
- when there's a new version of those packages, you have to check manually (cvs changelog) for what kernel they are build.
If you -Syu daily, you'll have the latest package for your kernel, but if you only -Syu weekly or monthly it is more tricky.
As those packages already have kernel26 as dep and need to be rebuild anayway for a new kernel, all this takes is adding the kernel version in the pkgbuild.
Is it permissable to do depends=(kernel26>=$_KERNEL_VER) - that'd make it nice and easy for devs to keep track of.
If that's how it works, it looks like a good solution.
If the kernel bumps from .22 to .23 it still reports the module working.
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/network/madwifi/PKGBUILD?rev=1.17&cvsroot=Extra&only_with_tag=CURRENT&content-type=text/vnd.viewcvs-markup
madwifi - uses _kernver to point to correct modules
If the depends line was changed to depends>=$_kernver, then surely people who do not update to new kernel will not be able to update to new madwifi pkg (once it was rebuilt).
Or am I missing something? Surely every module pkg depends on a specific kernel version purely because of the install location of the module itself?
I still think that IgnorePkg is the best way.
Sure, we can introduce major kernel version in package names (something like kernel.22-$pkgver-$pkgrel and madwifi.22-$pkgver-$pkgrel) but that's very ugly.
On my laptop fglrx and madwifi depend on kernel26 .
In order to block 1 package (kernel26) and keep a working system i need to add 3 packages to IgnorePkg.
That's hardly KISS and the kind of problem pacman should take care of.
The best solution imo :
Find an easy way to include the MAJOR kernel version in package dependencies.
- Add kernel26 to IgnorePkg
- Pacman makes sure you don't install packages build for another kernel.
It seems the problem lies in finding that easy way.
AFAIK pacman knows that kernel26-2.6.22.1 is >= kernel26-2.6.22 - so that should cover it.
However, I do now see the problem. With depends>= the dependency will still be fulfilled when the kernel is upgraded, which makes no sense because the module will actually break. Sadly, I don't think either way makes more sense than the other.
What about depends=('kernel26=2.6.22*') - will that work?
That'd work for more than just the kernel for anything that branches on . versions, you could depend on one branch very easily.
Feel free to open new feature request for this in Pacman project.
depends=('kernel26>=2.6.22' 'kernel26<2.6.23')
I don't know how pacman handles it, but it would be the most logical way. Other option is to support versioned conflicts, which isn't possible at this moment.
http://bbs.archlinux.org/viewtopic.php?pid=268908#p268908
_kernel_version=2.6.23
depends=("kernel26>=${_kernel_version}a" "kernel26<=${_kernel_version}.9999")
Reasoning: "kernel26>=${_kernel_version}a" would be needed to handle any rc kernels, since 2.6.23rc1 is considered less-than 2.6.23, however it's considered greater-than 2.6.23a.
"kernel26<=${_kernel_version}.9999" may seem hackish, but let's pretend .23.9999 exactly equals .24 since I really doubt anyone will get to 9999 incremental releases of a kernel.
This would work as we want, guarding against an improper kernel version.
Thoughts?