Executable scripts in both /etc/kernel/preinst.d and /etc/kernel/postinst.d cannot execute `emerge @module-rebuild`. Here are the errors I got. * !!! /etc/portage/make.profile is not a symlink and will probably prevent most merges. * /bin/sh not available It seems that emerge was executed in chroot or a sandboxed environment, but I could not locate chroot or sandbox. Reproducible: Always
The problem is pollution of the environment. The first error for example is caused by ARCH being set to the value the kernel expects instead of the value portage uses. If you want to do this you can take the plugin script directly from: https://github.com/projg2/installkernel-gentoo/tree/master/hooks But be aware that we dropped this feature because while this script works for me, it is known to cause some weird problems with lock files because we might end up calling emerge in an emerge if distribution kernels are used.
I guess I will just call emerge separately from `make install`.