Basically I use a custom kernel config and then use genkernel to build the kernel and initrd. Now with each new kernel version I have to manually copy /etc/kernels/old_version to /etc/kernels/new_version in order to have genkernel use the old config for the new kernel. I do not want to have one default kernel config (by setting DEFAULT_KERNEL_CONFIG) but simply use the one with the highest version number (up to the current kernel version but not higher of course) in /etc/kernels Reproducible: Always Steps to Reproduce: 1. make a custom kernel config for kernel 2.6.11 2. install a newer kernel (eg 2.6.12) 3. run genkernel Actual Results: It used the default config supplied for 2.6.12 Expected Results: I'd like to have a switch to automagically use the latest available config, in my case 2.6.11. Then save this config for 2.6.12 and the next time use the 2.6.12 config Using genkernel 3.2.5
--kernel-config=<file> Kernel configuration file to use for compilation There is this option which has been in genkenrel for a *long* time. Please use it.
Thats not what I asked for. I would like a switch to automatically use the latest available config. I know that I can specify a config, but this would still require me to manually specify a config. I'd like to have genkernel use the latest available config.
Something like... genkernel --kernel-config=`ls --sort=time /etc/kernels/config* -1|head -n 1` for instance? Come on...
Agreed. This is easily resolvable without modifying genkernel. I simply don't see this getting anything done on it any time in the near future. After all, your specification is too wide. What if you have both vanilla-sources and gentoo-sources? They'll produce differently- named kernel configs. How do we determine which is newest? How do we determine which to use? There's just simply too much that *should* be left up to the operator there that could cause errors, which would lead to more bugs being filed when genkernel didn't pick the one the user expected. Essentially, this one is going WONTFIX unless someone provides a suitable patch that is able to account for all the possible variations of scenarios created by this. It's simply too big of a can of worms for us to want to open.
genkernel --kernel-config=`ls --sort=time /etc/kernels/config* -1|head -n 1` is not a good idea since something similiar failed for me when I tried to compile an older kernel once. Aw, would be a nice feature if implemented correctly imo. Regarding mixing vanilla and gentoo sources, imo what should be done is .) decide which kernel (vanilla or gentoo or something else) one is using (look at the symlink if thats the only possible solution) .) get the kernel version + additional gentoo revisions .) get the "best" kernel config for this kernel from /etc/kernels (the highest possible version number which is still <= the kernel one wants to compile). This is imo not easily done by writing a one liner in bash, but proove me wrong and I'll happily use your one liner ;) kind regards