Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 3/4] llvm.eclass: Do not prepend /usr/bin to PATH, #622866
Date: Fri, 30 Jun 2017 21:36:49
Message-Id: 20170630213431.17767-4-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES] llvm.eclass: More flexible slot testing and fix to /usr/bin PATH prepending by "Michał Górny"
1 ---
2 eclass/llvm.eclass | 8 +++++++-
3 1 file changed, 7 insertions(+), 1 deletion(-)
4
5 diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
6 index 2aeba9c8ae39..73af88e44b8e 100644
7 --- a/eclass/llvm.eclass
8 +++ b/eclass/llvm.eclass
9 @@ -159,7 +159,13 @@ llvm_pkg_setup() {
10 debug-print-function ${FUNCNAME} "${@}"
11
12 if [[ ${MERGE_TYPE} != binary ]]; then
13 - export PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin:${PATH}
14 + local llvm_prefix=$(get_llvm_prefix "${LLVM_MAX_SLOT}")
15 +
16 + # do not prepend /usr/bin, it's not necessary and breaks other
17 + # prepends, https://bugs.gentoo.org/622866
18 + if [[ ${llvm_prefix} != ${EPREFIX}/usr ]]; then
19 + export PATH=${llvm_prefix}/bin:${PATH}
20 + fi
21 fi
22 }
23
24 --
25 2.13.2