Summary: | sys-devel/binutils-config: add explicit --root option | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Arfrever Frehtes Taifersar Arahesis <arfrever.fta> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 830854 |
Description
Arfrever Frehtes Taifersar Arahesis
2022-01-09 16:16:49 UTC
respecting $ROOT is entirely expected & desired behavior if you want to add a --root to explicitly set/override it, that's fine Build systems of other packages may use ROOT for entirely different purposes (e.g. even custom path to 'root' tool from sci-physics/root).
Exporting of some other variables (especially A) causes even more widespread problems.
Future EAPI may stop exporting all Gentoo-specific variables for consistency. They will remain in ebuild environment as non-exported variables.
If you want that ${ROOT} information be passed to binutils-config through environmental variable, then sys-devel/binutils ebuilds can simply explicitly export ROOT (preferably in subshell):
> pkg_postinst() {
> (
> # Make sure this ${CTARGET} has a binutils version selected
> [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
> export ROOT
> binutils-config ${CTARGET}-${PV}
> )
> }
(And similarly in pkg_postrm().)
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2) > Build systems of other packages may use ROOT for entirely different purposes other build systems don't matter. they aren't running binutils-config or gcc-config. > If you want that ${ROOT} information be passed to binutils-config through > environmental variable, then sys-devel/binutils ebuilds i didn't say the env var has to be used in the ebuilds. that's why the bug is still open -- we can add a --root option for them. |