Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180161 - genkernel-3.4.8 enhanced symlink handling flawed: my bad!
Summary: genkernel-3.4.8 enhanced symlink handling flawed: my bad!
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-05-28 23:17 UTC by John R. Graham
Modified: 2007-08-22 19:54 UTC (History)
0 users

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


Attachments
Patch addresses --symlink bug. (genkernel-symlink.patch,1.94 KB, patch)
2007-05-28 23:20 UTC, John R. Graham
Details | Diff
Patch corrects other minor issues (and closes two other bugs). (genkernel-misc.patch,3.15 KB, patch)
2007-05-28 23:57 UTC, John R. Graham
Details | Diff
Patch, additive to last one, fixes other --symlink issues. :( (genkernel-3.4.8-symlink-for-good.patch,2.87 KB, patch)
2007-07-24 02:05 UTC, John R. Graham
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John R. Graham gentoo-dev 2007-05-28 23:17:57 UTC
In March, I enhanced the genkernel code that copies the kernel build process work products to /boot to include symlink handling like that implemented in the manual kernel build "make install" process.  Chris Gianelloni was kind enough to accept the enhancements and make them part of genkernel-3.4.8.

Unfortunately, I introduced a logic flaw in the symlink tracking code that, on a kernel version change, results in the new kernel (and other work products) being copied into a file named after the previously compiled kernel version.  This flaw only manifests when genkernel is being asked to manage symlinks (with the --symlink command line option or with SYMLINK="yes" genkernel.conf).

I had also been working on other modest changes to genkernel before I discovered this rather embarassing flaw.  They were too modest to release yet otherwise.  Therefore, I'm submitting two patches.  The first one fixes my --symlink bug.  The second one does several small things:
* Adds logic so that the --oldconfig command line option can be defaulted in
  genkernel.conf.
* Adds logic so that the --tempdir command line option can be defaulted in
  genkernel.conf.  Also adds missing documentation to the man page for the
  --tempdir command line option.  This closes bug #144703.
* Corrects the man page's description of the --debugfile command line
  option.  This closes bug #150697.

Reproducible: Sometimes

Steps to Reproduce:
1.  Emerge new version of kernel sources.
2.  Use genkernel with the --symlink and --install options to compile the new kernel.
3.  New kernel binary (and initrd and System.map) will be named incorrectly in /boot.
Comment 1 John R. Graham gentoo-dev 2007-05-28 23:20:21 UTC
Created attachment 120554 [details, diff]
Patch addresses --symlink bug.
Comment 2 John R. Graham gentoo-dev 2007-05-28 23:57:49 UTC
Created attachment 120556 [details, diff]
Patch corrects other minor issues (and closes two other bugs).
Comment 3 John R. Graham gentoo-dev 2007-05-28 23:58:45 UTC
My bad again.  This issue is "Reproducible Always" with the previously mentioned preconditions.
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2007-06-21 20:17:02 UTC
Thanks!

I've added both patches to SVN and they'll show up in the next version of genkernel.
Comment 5 John R. Graham gentoo-dev 2007-07-24 02:05:41 UTC
Created attachment 125824 [details, diff]
Patch, additive to last one, fixes other --symlink issues.  :(

You guys are going to scrag me.  I ran into another flaw in my --symlink code, which has prompted me to embark on a massive regression test.  It works correctly in *all* corner cases now.  I apologize profusely, but this is the *last* time I'll have to revisit this minor issue.

- John
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2007-08-21 17:31:50 UTC
OK.  I just added the latest patch to SVN so hopefully we're all done now.  If not, please file up a new bug to keep the confusion down on my end.  Thanks for the patch... =]
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2007-08-22 19:54:11 UTC
Please test genkernel 3.4.9_prer1 or better.  This should be fixed now.