Standard (pre-4) behaviour was take module from --module-prefix= and put into initrd's /lib/modules, but now it create full source path inside initrd root.
Sorry, but I don't understand this bug report. What's the problem you are reporting? --module-prefix sets INSTALL_MOD_PATH. And the usage of INSTALL_MOD_PATH in append_modules() and compile_modules() hasn't changed.
I run genkernel (inside ebuild) with --module-prefix=/var/tmp/portage/.../work/build (where exists /lib/modules/...). Before v4 (for many years) genkernel put this modules into root (/lib/modules), now - full path "/var/tmp/portage/...". PS As I repack and rework produced cpio, so I add "mv ..." into my script and locally problem solved for me, but there are not legacy behaviour.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=75fd4f4d05df729511f071b2c1a163f08f522622 commit 75fd4f4d05df729511f071b2c1a163f08f522622 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-07-23 19:00:10 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-07-23 19:00:10 +0000 gen_initramfs.sh: Refactor append_modules() to not include --module-prefix Make sure to chdir into ${INSTALL_MOD_PATH%/}/lib/modules/${KV} before copying modules to avoid inclusion of --module-prefix path. Bug: https://bugs.gentoo.org/690260 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_initramfs.sh | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
Released with >=sys-kernel/genkernel-4.0.0_beta9, thank you for the report!