Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39752 - Genkernel fails to load modules with dependencies
Summary: Genkernel fails to load modules with dependencies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-29 05:31 UTC by vtkstef
Modified: 2004-02-07 07:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vtkstef 2004-01-29 05:31:54 UTC
the file /usr/share/portage/generiv/modprobe implements recursion incorrectly because the following two environment variable must be declared local to the modeprobe2 routine:

  local real_path
  local modlist

because if they are not, only dependent modules are loaded, and not the modules with the dependency. To explain this 'source in' and run this little function:

func_one() {
  local lere
  if [ "${1}" != "ooooo" ]
  then
    lere="${1}o"
    gere="${gere}g"
    func_one ${lere}
  fi
  echo ${lere}
  echo ${gere}
}

this function recurs 5 times. You'll notice that 'gere' acts like a global variable, which ends up all the time with the last computed value. In the case of genkernel this means that it only insmods the base module (in the case of scsi it only loads scsi_mod)

Also there are other two syntax errors in /usr/src/share/genkernel/generic/linuxrc. Towards the end when it needs to dismount the temporary fs. and proc file system the if statements useserronously the test operator instead of encompassing the conditional inside 
[  square brackets ]
Comment 1 Brad House 2004-01-29 19:30:34 UTC
this was already fixed in CVS when you reported it, just hadn't
rolled a release.

as for your second comment, the square brackets should not be used,
if you read the statement right above it you'll understand why
it uses the test directive instead of   [ ]  
it has to do with older versions of coreutils not having [  in the proper
location, since you've pivot_root at that point, it's using the executables
on the real core ...
kind of odd, Weeve noticed it, and I had to change it
Comment 2 vtkstef 2004-01-30 09:53:12 UTC
In the bootup log on my machine I saw those test statements fail, and for that reason linuxrc did not unmount the initrd temporary mount points. After I changed the statements to square brackets the initrd moint points were successfully unmounted. BTW I like the genkernel's initrd premises, and designs. Beats the hell out of RH mkinitrd.
Comment 3 vtkstef 2004-02-02 13:12:38 UTC
as asked by developer I am reposting the comment here.

Hi I am not the only one seeing the test statements fail
after the pivot_root in /linuxrc

please see

http://forums.gentoo.org/viewtopic.php?p=796269#796269

FYI: I have coreutils-5.0.91-r4 installed on my system

Comment 4 Brad House 2004-02-07 06:50:37 UTC
very odd, well, I'll change it back to the square brackets .... as that's
the way it was originally, until Weeve (another dev) reported an issue
with a very old coreutils version, which required a change to use 'test'
instead.  This worked on everything I had tried, but I'll go ahead and change
it back, and make sure the same coreutils version os stable on all arches.

-Brad
Comment 5 Brad House 2004-02-07 07:33:51 UTC
btw, you reposted to the wrong bug number, but whatever ...
this is all fixed in _beta10