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

Bug 201159

Summary: --kerneldir override nonfunctional (>= 3.4.9_pre9-r1)
Product: Gentoo Hosted Projects Reporter: Robert Trace <bugzilla-gentoo>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal CC: john_r_graham, reuben-gentoo-bugzilla
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix --kerneldir on genkernel-3.4.9_pre9-r1
Version of above that is (slightly) more consistent with the rest of the code.

Description Robert Trace 2007-12-04 00:59:39 UTC
The --kerneldir argument isn't working.

The culprit is either gen_cmdline.sh or gen_determineargs.sh, depending on the author's personal preference.

gen_cmdline.sh:413 says:
 --kerneldir=*)
   CMD_KERNELDIR=....

and gen_determineargs.sh:73 says:
  set_config_with_override 2 KERNEL_DIR   CMD_KERNEL_DIR  "${DEFAULT_KERNEL_SOURCE}"

So, they're out of sync.  They need to agree on which of CMD_KERNELDIR or CMD_KERNEL_DIR is correct.

As the attached patch will demonstrate, changing CMD_KERNEL_DIR to CMD_KERNELDIR in gen_determineargs.sh will do the job.


Reproducible: Always

Steps to Reproduce:
1.  rm $DEFAULT_KERNEL_SOURCE (defined according to /etc/genkernel.conf)
2.  genkernel --kerneldir=/path/to/kernel all
3.  SPLAT

Actual Results:  
* Gentoo Linux Genkernel; Version 3.4.9_pre9
* Running with options: --kerneldir=/usr/src/linux-2.6.23-gentoo-r3 --no-clean --lvm all

* ERROR: kernel source directory "/usr/src/linux" was not found!



Expected Results:  
Find directory specified by --kerneldir override and attempt to build.
Comment 1 Robert Trace 2007-12-04 01:00:34 UTC
Created attachment 137664 [details, diff]
Fix --kerneldir on genkernel-3.4.9_pre9-r1
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2007-12-04 16:58:19 UTC
Bah, couldn't you have filed this 30 minutes earlier? We just did a release for another trivial fix :)
Comment 3 John R. Graham gentoo-dev 2007-12-05 02:50:38 UTC
Created attachment 137767 [details, diff]
Version of above that is (slightly) more consistent with the rest of the code.

Actually, although this isn't the only remaining inconsistency, most of the variables adhere to the following standard:
Arch default:  DEFAULT_X
Config file override:  X
Command variable:  CMD_X

The attached patch, which is a proposed replacement for the previous patch, stays closer to that convention.  Thanks for finding and fixing one of my bugs.

- John
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2007-12-06 04:04:26 UTC
I've applied the second patch in SVN. Thanks.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2007-12-27 19:11:16 UTC
This is fixed in 3.4.9_pre12, so please try it out and report back any problems.