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.
Created attachment 97064 [details] emerge --info
Created attachment 97067 [details] emerge --info
> 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.
I'm an idiot =). Thanks a lot for your help, and I'm sorry for your trouble.
I guess this can be closed. ;)