Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201159 - --kerneldir override nonfunctional (>= 3.4.9_pre9-r1)
Summary: --kerneldir override nonfunctional (>= 3.4.9_pre9-r1)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-04 00:59 UTC by Robert Trace
Modified: 2007-12-27 19:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix --kerneldir on genkernel-3.4.9_pre9-r1 (genkernel-3.4.9_pre9-kerneldir.patch,953 bytes, patch)
2007-12-04 01:00 UTC, Robert Trace
Details | Diff
Version of above that is (slightly) more consistent with the rest of the code. (genkernel-3.4.9_pre9-kerneldir2.patch,489 bytes, patch)
2007-12-05 02:50 UTC, John R. Graham
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.