I can't emerge switcheroo-control on a prefix gentoo install hosted in a Centos 7 system. What happens is that, in the install phase, the path > /localdisk/gentoo/var/tmp/portage/sys-power/switcheroo-control-2.6-r2/image/usr/bin/switcherooctl is not found. The actual path of the file is: > /localdisk/gentoo/var/tmp/portage/sys-power/switcheroo-control-2.6-r2/image/localdisk/gentoo/usr/bin/switcherooctl Practically what happens is that "/localdisk/gentoo" (the prefix) is inserted between the path of the installable file and the path to the build directory when compiling. Reproducible: Always
I've managed to get around this bug by adding the EPREFIX to the argument of python_fix_shebang argument in the src_install() function ... so: > python_fix_shebang "${D}"/usr/bin/switcherooctl became > python_fix_shebang "${D}""${EPREFIX}"/usr/bin/switcherooctl strange
you could use "${ED}", it's a shorthand for (approximately) "${D}${EPREFIX}"
(and ${D} -> ${ED} is the right thing to do here)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2408e5e8ca34463ad5ceaff11b8465012c95ef9 commit a2408e5e8ca34463ad5ceaff11b8465012c95ef9 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2023-12-25 11:25:00 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2023-12-25 11:25:00 +0000 sys-power/switcheroo-control-2.6-r2: fix for Prefix, #917566 Closes: https://bugs.gentoo.org/917566 Signed-off-by: Fabian Groffen <grobian@gentoo.org> sys-power/switcheroo-control/switcheroo-control-2.6-r2.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)