Probably the unstable version has already fixed it - but the unstable needs an unstable openrc ... therefore pls look here : <----------------- $ for i in 2; do sudo genkernel --no-clean --kerneldir=/usr/src/linux-3.$i.x/ all; done* Gentoo Linux Genkernel; Version 3.4.24_p2 * Running with options: --no-clean --kerneldir=/usr/src/linux-3.2.x/ all * Linux Kernel 3.2.233.2.22 for x86... <----------------- * mount: /boot mounted successfully! Reproducible: Always
What I'd expect would be something like this : * Linux Kernel 3.2.23 (old: 3.2.22) for x86...
Are you sure this is a bug in Genkernel? Genkernel does not try t figure out if you are trying to rebuild in a tree from a earlier version. I also think I have seen similar things to this when building from Linus git-tree if I did not clean out the tree in between his version bumps. What does "make kernelversion" give you? To be honest Genkernel has an awful grepping trying to figure out the version of the current selected tree, and I have currently not time to dive into if make "kernelversion" can archieve the same, but it only handles one version at a time, which makes me think this is more of a problem with your tree.
n22 /usr/src # cd linux-3.5.x n22 /usr/src/linux-3.5.x # make kernelversion 3.5.0 n22 /usr/src/linux-3.5.x # cd ../linux-3.0.x n22 /usr/src/linux-3.0.x # make kernelversion 3.0.39 n22 /usr/src/linux-3.0.x # cd ../linux n22 /usr/src/linux # make kernelversion 3.5.0 n22 /usr/src/linux # logout tfoerste@n22 /usr/src/linux $ cd tfoerste@n22 ~ $ cd devel/linux/ tfoerste@n22 ~/devel/linux $ make kernelversion 3.5.0
(In reply to comment #3) I meant for the tree genkernel fails with (3.2) I want to make sure that it is not your specific kernel tree that may have some inbetween-version berfore I try to figure out something with get_KV [1]. Because really, it is ugly, I really want to know if it can be replaced with make kernelversion, but I rather not if I do not have to, since there might be a reason they did it this way (that was not "oooold kernel did not have kernelversion"). http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=blob;f=gen_determineargs.sh;h=7f352f8ff4d92c9ced40009b73ffb5e0e5f9c256;hb=HEAD#l4
(In reply to comment #4) > (In reply to comment #3) > > I meant for the tree genkernel fails with (3.2) Oh - in the mean while I moved 3.2 away. But AFAICR it failed every time when I had have an older kernel in the source directory.
So I pinpointed this. http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=blob;f=gen_determineargs.sh;h=7f352f8ff4d92c9ced40009b73ffb5e0e5f9c256;hb=HEAD#l50 This file uses the following to find out the version number: VER=`grep ^VERSION\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'` PAT=`grep ^PATCHLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'` SUB=`grep ^SUBLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'` EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'` Then it does the following: UTS_RELEASE=`cat ${KERNEL_DIR}/include/config/kernel.release` LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` KV=${VER}.${PAT}.${SUB}${EXV}${LOV} AFAICS what it tries to do is take the info from kernel.release, and then remove the VER.PAT.SUB it extracted from Makefile earlier on. The problem with this in your case is: kernel.release is made during the build. When you later update your kernel tree the Makefiles gets its updates, however kernel.release remains the same. So the VET.PAT.SUB that was extracted does not match with what was in kernel.release anymore, so the sed fails to mask away the version number. There is a lot of questions on what really is necessary and what is not in this file, and why we just do not do "make kernelconfig" to figure things out. So I can confirm your error (it is as easy as pulling linus git tree, and inside it while clean run "git reset --hard v3.5 && make allnoconfig && make && git pull" and after that genkernel will get the wrong version number until kernel.release is updated/removed.... Now how to fix this, that is another question....
Hhm, as long as the whole thing has to be investigated (it is necessary and so on) - what's about a quick&dirty hack i the mean while to at least separate those 2 version strings during output ?
(In reply to comment #7) > Hhm, as long as the whole thing has to be investigated (it is necessary and > so on) - what's about a quick&dirty hack i the mean while to at least > separate those 2 version strings during output ? I think what you misunderstood here is that there is not supposed to be two version strings to begin with. Genkernel does not try to find out whether you have a tree updated from an old or not. So really, it is supposed to only show the version of the tree it currently tries to compile That you see two different version number is because of a bug which should be fixed. However to fix it someone has to figure out why that magic exists to begin with, and if it is a linux-2.4 legacy (at least the UTS-parts does not seem to be any references to in a modern 3.6-kernel), or something other magic. And I will not have the time to do it myself until at least 9 november due to work. If someone feels brave we could just replace the logic with a KV="$(make kernelversion)" (untested) and see what breaks (if anything).
FWIW when I upgrade a stable rc1 kernel candidate to final stable kenrel of the same version it looks ok : tfoerste@n22 ~ $ for i in 6; do sudo genkernel --no-clean --kerneldir=/usr/src/linux-3.$i.x/ all; done * Gentoo Linux Genkernel; Version 3.4.45 * Running with options: --no-clean --kerneldir=/usr/src/linux-3.6.x/ all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86/modules_load .. * Linux Kernel 3.6.7-rc1 for x86... * .. with config file /etc/kernels/kernel-config-x86-3.6.7-rc1 * kernel: --mrproper is disabled; not running 'make mrproper'. * >> Running oldconfig... * kernel: --clean is disabled; not running 'make clean'. * >> Compiling 3.6.7 bzImage... for different minor versions however the same picture : tfoerste@n22 ~ $ for i in 4; do sudo genkernel --no-clean --kerneldir=/usr/src/linux-3.$i.x/ all; done* Gentoo Linux Genkernel; Version 3.4.45 * Running with options: --no-clean --kerneldir=/usr/src/linux-3.4.x/ all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86/modules_load .. * Linux Kernel 3.4.193.4.18 for x86... * .. with config file /usr/share/genkernel/arch/x86/kernel-config * mount: /boot mounted successfully! * kernel: --mrproper is disabled; not running 'make mrproper'. * >> Running oldconfig... * kernel: --clean is disabled; not running 'make clean'. * >> Compiling 3.4.19 bzImage...
Upgrading from 3.6.9-rc1 to 3.6.9 however doesn't show that issue : $ for i in 6; do sudo genkernel --no-clean --kerneldir=/usr/src/linux-3.$i.x/ all; done * Gentoo Linux Genkernel; Version 3.4.45 * Running with options: --no-clean --kerneldir=/usr/src/linux-3.6.x/ all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86/modules_load .. * Linux Kernel 3.6.9-rc1 for x86...
4 years old ...