Example: EAPI=4 src_install() { mkdir -p a/b/c/d/e/f dodoc -r a } Results: ${D}usr/share/doc/${PF}/a ${D}usr/share/doc/${PF}/b ${D}usr/share/doc/${PF}/c ${D}usr/share/doc/${PF}/d ${D}usr/share/doc/${PF}/e Note: When we rewrite this, we may want to borrow some of the recursion optimization code from doins -r.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=23694b1dd9c6400da68ea2029e9f190994a631ac
This is fixed in 2.1.9.42 and 2.2.0_alpha26.