Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 616200

Summary: kernel-2.eclass - fix OKV for _rc versions
Product: Gentoo Linux Reporter: Dennis Schridde <dennis.schridde>
Component: EclassesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: kernel-2.eclass.patch
Fix-OKV-for-_rc-versions.patch
Fix-OKV-for-_rc-versions.patch

Description Dennis Schridde 2017-04-21 12:54:29 UTC
Created attachment 470548 [details, diff]
kernel-2.eclass.patch

For _rc versions, OKV gets set to "[4]" (for PV="4.11.0_rc7"), which is obviously wrong - the source tarball can not be fetched.

This is caused by referencing the OKV_DICT map in a wrong way: `$OKV_DICT["${KV_MAJOR}"]` should have been `${OKV_DICT[${KV_MAJOR}]}`.

Afterwards, the kernel-2.eclass will try to fetch linux-3.19.tar.xz, which is still wrong for PV="4.11.0_rc7". The intention of the OKV_DICT map is probably to get the wrap-around for "4.0" -> "3.19" and "3.0" -> "2.6.39" right. Hence I modified the code to actually perform a wrap instead of just fixing the version to "3.19".
Comment 1 Dennis Schridde 2017-04-21 12:59:23 UTC
Created attachment 470552 [details, diff]
Fix-OKV-for-_rc-versions.patch
Comment 2 Dennis Schridde 2017-04-21 13:01:20 UTC
Created attachment 470556 [details, diff]
Fix-OKV-for-_rc-versions.patch
Comment 3 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-04-26 20:33:24 UTC
in which ebuild this problem happen ?
Comment 4 Dennis Schridde 2017-04-26 20:42:42 UTC
I found the issue when trying to build sys-kernel/coreos-sources-4.11_rc7 from CoreOS' overlay [1]. It does little more than inheriting kernel-2.eclass.

[1]: https://github.com/coreos/coreos-overlay/blob/master/sys-kernel/coreos-sources/coreos-sources-4.10.12.ebuild
Comment 5 Mike Pagano gentoo-dev 2017-04-28 23:51:58 UTC
This looks good and passed all my testing. Would you mind posting it to gentoo-dev? It's a written policy we post eclass patches to -dev.
Comment 6 Dennis Schridde 2017-05-05 12:22:08 UTC
(In reply to Mike Pagano from comment #5)
> This looks good and passed all my testing. Would you mind posting it to
> gentoo-dev? It's a written policy we post eclass patches to -dev.

Thanks for the hint. I posted to gentoo-dev, but my email does not appear in the archives [1] - I assume the list is moderated?

[1]: https://archives.gentoo.org/gentoo-dev/threads/2017-05/
Comment 7 Mike Pagano gentoo-dev 2021-08-21 14:30:33 UTC
It looks like coreos-sources is EOL'd. I could not find it.
If someone still needs this for a kernel that still exists so I can reproduce please reopen.