Bug 180161 - genkernel-3.4.8 enhanced symlink handling flawed: my bad!
Bug#: 180161 Product:  Gentoo Hosted Projects Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: genkernel@gentoo.org Reported By: john_r_graham@mindspring.com
Component: genkernel
URL: 
Summary: genkernel-3.4.8 enhanced symlink handling flawed: my bad!
Keywords:  
Status Whiteboard: 
Opened: 2007-05-28 23:17 0000
Description:   Opened: 2007-05-28 23:17 0000
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 From John R. Graham 2007-05-28 23:20:21 0000 -------
Created an attachment (id=120554) [details]
Patch addresses file naming issue.

------- Comment #2 From John R. Graham 2007-05-28 23:57:49 0000 -------
Created an attachment (id=120556) [details]
Patch corrects other minor issues (and closes two other bugs).

------- Comment #3 From John R. Graham 2007-05-28 23:58:45 0000 -------
My bad again.  This issue is "Reproducible Always" with the previously
mentioned preconditions.

------- Comment #4 From Chris Gianelloni (RETIRED) 2007-06-21 20:17:02 0000 -------
Thanks!

I've added both patches to SVN and they'll show up in the next version of
genkernel.

------- Comment #5 From John R. Graham 2007-07-24 02:05:41 0000 -------
Created an attachment (id=125824) [details]
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 From Chris Gianelloni (RETIRED) 2007-08-21 17:31:50 0000 -------
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 From Chris Gianelloni (RETIRED) 2007-08-22 19:54:11 0000 -------
Please test genkernel 3.4.9_prer1 or better.  This should be fixed now.