Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917566 - sys-power/switcheroo-control-2.6-r2 fails to install
Summary: sys-power/switcheroo-control-2.6-r2 fails to install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-18 12:57 UTC by Marius Stoica
Modified: 2023-12-25 11:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Stoica 2023-11-18 12:57:50 UTC
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
Comment 1 Marius Stoica 2023-12-09 09:42:25 UTC
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
Comment 2 Fabian Groffen gentoo-dev 2023-12-09 16:36:37 UTC
you could use "${ED}", it's a shorthand for (approximately) "${D}${EPREFIX}"
Comment 3 Fabian Groffen gentoo-dev 2023-12-09 16:38:06 UTC
(and ${D} -> ${ED} is the right thing to do here)
Comment 4 Larry the Git Cow gentoo-dev 2023-12-25 11:25:33 UTC
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(-)