The baselayout package fails to install a new RISC-V root when split-usr is masked because of its multilib libdir subdirectories. See the multilib_layout function in the ebuild. Reproducible: Always Steps to Reproduce: 1. emerge --{,sys}root=/tmp/newroot -v baselayout # with split-usr masked in a riscv profile Actual Results: >>> Emerging (1 of 1) sys-apps/baselayout-2.7::gentoo for /tmp/newroot/ * baselayout-2.7.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] * symlinking /tmp/newroot/lib64/lp64d to usr/lib64/lp64d ln: failed to create symbolic link '/tmp/newroot/lib64/lp64d': No such file or directory * ERROR: sys-apps/baselayout-2.7::gentoo failed (setup phase): * Unable to make /tmp/newroot/lib64/lp64d symlink Expected Results: It should build and install.
It seems that adding 'mkdir -p' for parent directory before 'ln -s' should work. Also since elements of prefix_lst array contain "${EROOT}", ${prefix_lst[@]} needs to be quoted as "${prefix_lst[@]}"...
Created attachment 645456 [details, diff] Patch
Created attachment 645464 [details, diff] Patch
To reiterate here from IRC earlier so I don't forget, the patch fixes the build failure, but it creates a /lib64 directory with lp64 and lp64d symlinks inside it, which is not the expected UsrMerge layout. It should be /lib64 is a symlink to usr/lib64 where lp64 and lp64d are subdirectories.
Created attachment 695970 [details, diff] fix.patch Here is an EAPI update that includes this fix.
Created attachment 695973 [details, diff] style.patch I'll upload this as a separate patch since it's so noisy. Feel free to squash them.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0ced97b588ac34ba5730ff812248e4e7f2af1cd commit b0ced97b588ac34ba5730ff812248e4e7f2af1cd Author: David Michael <fedora.dm0@gmail.com> AuthorDate: 2021-03-29 15:28:36 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2021-04-16 16:25:51 +0000 sys-apps/baselayout: EAPI 7, fix RISC-V UsrMerge, sync live This fixes the UsrMerge layout on RISC-V with its subdirectory libdirs so that only lib and lib64 and links. It also updates the test for bad shells to look in the target root. Closes: https://bugs.gentoo.org/728674 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: William Hubbs <williamh@gentoo.org> sys-apps/baselayout/baselayout-2.7-r2.ebuild | 318 +++++++++++++++++++++++++++ sys-apps/baselayout/baselayout-9999.ebuild | 74 ++++--- 2 files changed, 359 insertions(+), 33 deletions(-)