Unfortunately, the assumption that all kernel tarballs and patches reside under "linux/kernel/" at kernel.org no longer holds true. The attached patch fixes that by removing the hardcoded paths and defining $kernel_base_uri in detect_version() just before it is required. Currently, 2.6.32, 2.6.34 and 2.6.35 are treated specially because they are longterm releases. This patch also includes two minor whitespace cleanups. It hasn't been heavily tested but it should be OK.
Created attachment 261072 [details, diff] kernel-2-eclass-longterm.patch
Another expression which does the job and allows for the code to be somewhat more concise and re-usable: [[ " 2.6.32 2.6.34 2.6.35 " = *" ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} "* ]] There are more elegant ways to do it but, just as in the already submitted patch, this does not require any modern bash features and it gets the job done. I'll attach an alternate (functionally identical) patch which uses the above method. It varies from the previous patch in one other respect: it safely replaces one instance of "linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.tar.bz2" with "linux-${OKV}.tar.bz" for reasons of legibility.
Created attachment 261076 [details, diff] kernel-2-eclass-longterm-alt.patch
*** Bug 349920 has been marked as a duplicate of this bug. ***
Adding back CC'd parties from earlier bug.
Created attachment 261300 [details, diff] Patch using ebuild variable I'm leaning towards an ebuild variable so that we don't have to maintain versions in the eclass. I'm still testing this one.
(In reply to comment #6) > Created an attachment (id=261300) [details] > Patch using ebuild variable +1 on this version.
As far as I can tell, none of the existing ebuilds would require modification (at the time of writing), which makes the process easier. Those ebuilds which use the 2.6.X.Y naming scheme are: sys-kernel/linux-docs sys-kernel/linux-headers sys-kernel/mips-sources sys-kernel/openvz-sources sys-kernel/vanilla-sources sys-kernel/xbox-sources In all likelihood, only vanilla-sources will need to be considered in the short term: >=vanilla-sources-2.6.32.28 < 2.6.33 >=vanilla-sources-2.6.34.8 < 2.6.35 >=vanilla-sources-2.6.35.10 < 2.6.36
Committed