Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147710 - Portage failing to install kernel modules, appears to try incorrect directory. Using emerge does not work, but using ebuild does.
Summary: Portage failing to install kernel modules, appears to try incorrect directory...
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-15 11:12 UTC by Andy Getz
Modified: 2006-09-15 12:32 UTC (History)
0 users

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


Attachments
emerge --info (einfo,8.92 KB, text/plain)
2006-09-15 11:16 UTC, Andy Getz
Details
emerge --info (einfo,8.92 KB, application/octet-stream)
2006-09-15 11:26 UTC, Andy Getz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Getz 2006-09-15 11:12:28 UTC
I have upgraded the kernel on my 2-3 week old 2006.1 system from suspend2-sources-2.6.17-r4 to -r5 and -r6.  I attempted to use emerge to rebuild the kernel module packages needed by the system, but found that although I had no problems with the initial build for -r4, upon upgrading to -r5 and subsequently -r6, emerge no longer was able to build and merge the modules, although ebuild was.

emerge nvidia-drivers (for example; the same effect is present in many other module packages) produces the following output:
>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-1.0.8774 to /
>>> Extracting info
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.17-suspend2-r6
 * Checking for MTRR support ...                                                                                          [ ok ]
>>> Extracting nvidia-drivers-1.0.8774
>>> Merging x11-drivers/nvidia-drivers-1.0.8774 to /
--- /etc/
--- /etc/modules.d/
>>> /etc/modules.d/nvidia
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.17-suspend2-r4/
--- /lib/modules/2.6.17-suspend2-r4/video/
>>> /lib/modules/2.6.17-suspend2-r4/video/nvidia.ko
<...>

Note the following:
1) The system is running 2.6.17-suspend2-r6.  uname -r says so, /usr/src/linux points to -r6, etc.  The version numbers in the kernel makefiles are all correct as well.  -r4, where emerge is putting the .ko file above, has been unmerged, and its folders in /usr/src/linux and /lib/modules have been deleted.  emerge is recreating the /lib/modules/2.6.17-suspend2-r4/ folder in order to put modules into it.
2) The SRC_URI files were not present when this command was run.  Upon subsequent execution of ebuild, the files all had to be downloaded.
3) The module is never built, it seems to just merge.  Although I have keepwork on, I took care to delete the relevant folders in /var/tmp/portage/ before attempting to emerge or ebuild.

ebuild /usr/portage/<...>/nvidia-drivers-blah.ebuild {install, qmerge, etc} produces this:
 * NVIDIA-Linux-x86-1.0-8774-pkg1.run MD5 ;-) ...                                                                         [ ok ]
 * NVIDIA-Linux-x86-1.0-8774-pkg1.run RMD160 ;-) ...                                                                      [ ok ]
 * NVIDIA-Linux-x86-1.0-8774-pkg1.run SHA1 ;-) ...                                                                        [ ok ]
 * NVIDIA-Linux-x86-1.0-8774-pkg1.run SHA256 ;-) ...                                                                      [ ok ]
 * NVIDIA-Linux-x86-1.0-8774-pkg1.run size ;-) ...                                                                        [ ok ]
 * checking ebuild checksums ;-) ...                                                                                      [ ok ]
 * checking auxfile checksums ;-) ...                                                                                     [ ok ]
 * checking miscfile checksums ;-) ...                                                                                    [ ok ]
 * checking NVIDIA-Linux-x86-1.0-8774-pkg1.run ;-) ...                                                                    [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.17-suspend2-r6
 * Checking for MTRR support ...                                                                                          [ ok ]
>>> Unpacking source...
Creating directory NVIDIA-Linux-x86-1.0-8774-pkg1
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-8774.......................................................................................................................................................................................................................................................................................
 * Applying NVIDIA_glx-defines.patch ...                                                                                  [ ok ]
 * Applying NVIDIA_glx-glheader.patch ...                                                                                 [ ok ]
 * Converting Makefile.kbuild to use M= instead of SUBDIRS= ...                                                           [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/nvidia-drivers-1.0.8774/work/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv ...
 * Preparing nvidia module

NVIDIA: calling KBUILD...
make <...>

Note that the first time this command was run, the sources were downloaded.  Also note that this builds and successfully merges a working module; I am using the nvidia module right now.

As far as I can tell, I've checked everything that would affect module package installation.  In light of this, and the dramatic difference between the effects of emerge and ebuild, I believe this to be a Portage bug.
Comment 1 Andy Getz 2006-09-15 11:16:11 UTC
Created attachment 97064 [details]
emerge --info
Comment 2 Andy Getz 2006-09-15 11:26:09 UTC
Created attachment 97067 [details]
emerge --info
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-09-15 11:27:32 UTC
> EMERGE_DEFAULT_OPTS="-kavt"

--usepkg (-k)
Tells emerge to use binary packages (from $PKGDIR) if they are available, thus possibly avoiding some time-consuming  compiles.  This option is useful for CD installs; you can export PKGDIR=/mnt/cdrom/packages and then use this               option to have emerge "pull" binary packages from the CD in order to satisfy dependencies.
Comment 4 Andy Getz 2006-09-15 12:17:31 UTC
I'm an idiot =).
Thanks a lot for your help, and I'm sorry for your trouble.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-09-15 12:32:17 UTC
I guess this can be closed. ;)