Summary: | sys-apps/portage: (ROOT)PATH reconstruction inconsistent with modern baselayout behavior | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Michał Górny <mgorny> |
Component: | Core - Ebuild Support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 666956 |
Description
Michał Górny
2018-10-03 17:51:18 UTC
Some de-duplication logic might do the trick. Maybe something like this:
> diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
> index 941a597e2..f27ed897f 100644
> --- a/lib/portage/package/ebuild/doebuild.py
> +++ b/lib/portage/package/ebuild/doebuild.py
> @@ -214,2 +214,3 @@ def _doebuild_path(settings, eapi=None):
> rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
> + rootpath_set = frozenset(rootpath)
> overrides = [x for x in settings.get(
> @@ -245,3 +246,5 @@ def _doebuild_path(settings, eapi=None):
> for x in ("usr/local/sbin", "usr/local/bin", "usr/sbin", "usr/bin", "sbin", "bin"):
> - path.append(os.path.join(prefix, x))
> + x_abs = os.path.join(prefix, x)
> + if x_abs not in rootpath_set:
> + path.append(x_abs)
Looks good at a first glance. Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/7b602d63d3cc6361b50957a387c2651f https://github.com/gentoo/portage/pull/375 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=01b8e9277b3f6970ea09135def26b70dbf072a16 commit 01b8e9277b3f6970ea09135def26b70dbf072a16 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-10-08 02:37:59 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-10-08 04:29:34 +0000 _doebuild_path: Respect order defined in ROOTPATH (bug 667662) Respect the order of paths defined in /etc/env.d/*, so that packages like llvm can rely on ordering relative to paths defined in /etc/env.d/50baselayout since baselayout-2.6. See: https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=277e5b9e55717873b87eb541a95f4f2ae0c60a4d Bug: https://bugs.gentoo.org/667662 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/package/ebuild/doebuild.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) |