When using O= build directories the Makefile doesn't contain the SUBLEVEL & EXTRAVERSION variables. We need to go back to the source directory and reparse. Currently shows as the following error because SUB is null. /usr/share/genkernel/gen_arch.sh: line 61: [: : integer expression expected Reproducible: Always Steps to Reproduce: 1. mkdir /usr/src/test 2. make -C /usr/src/linux O=/usr/src/test defconfig 3. genkernel --kerneldir=/usr/src/test
Created attachment 166439 [details, diff] If SUBLEVEL wasn't found, look for it in the original source directory
I'm not sure we want to support this. I've never even seen this usage before. Also, your code could break pretty easily if they decide to change the Makefile format a bit.
It's quite common when supporting multiple configurations. It allows you to have a single source tree for multiple build configs. It won't break anymore than the rest of the script when they change the Makefile. Although I had considered pulling it out of the KV variable since that already deals with different versions, I decided to grab SUB in a similar manner to the original version. Also although the dev version has a make prepare it's commented out in the released version so kernel.release may not exist.
OOhh... patches... me likey patches... I'll look into this for 3.4.11's release.
I've applied this patch in Git. Thanks.
(In reply to comment #5) > I've applied this patch in Git. Thanks. Due to the date of the last comment on this bug I assume that feature to be included in 3.4.10.907 or an earlier release of genkernel. Closing, please re-open as needed.