I'm building a stage3 with catalyst using a custom profile. I've got virtual/linux-sources defined as sys-kernel/development-sources, so it merges development-sources-2.6.7 (successfully). The next package is device-mapper-1.00.08, which dies because there is no /usr/src/linux symlink in the stage3 chroot. The test done by the device mapper ebuild seems reasonable. The development sources ebuild uses the kernel-2 eclass, which looks like it's supposed to create the link in the postinst_sources() function. I don't know why it's not getting called (or working if it is). Reproducible: Always Steps to Reproduce: Expected Results: Either the development sources ebuild should link /usr/src/linux, or there should be a way for me to have catalyst to inject the correct symlink (less desireable). Right now I'm creating a dangling symlink in the stage2 work area and re-making the stage2 tar-ball myself.
There is an analagous problem building a livecd-stage2. genkernel won't run because the /usr/src/linux symlink isn't there. It *is* present in the livecd-stage1 area (because I had added it to the stage2 tarball) but disappears. If I add it by hand at just the right time, I can get the catalyst build to continue.
postinst_sources() most probably gets called (check if you can see the 'After installing a new kernel of any version, it is important..' message after the ebuild is installed - if you do, the function gets called). The thing is, the symlink will be created: a) in ${ROOT} - do you have your ROOT env variable set when you're using the ebuild? b) only if it doesn't already exist.
postinst_sources() is never called since pkg_postinst is defined in the ebuild. You need to call postinst_sources() explicitly in the ebuild. I added the call at the beginning on pkg_postint and it all looks good now.
Actually I believe the function that should be called, according the eclass HOWTO, should be kernel-2_pkg_postinst().
You're right. I've just fixed it in CVS. Thanks!