commit:     070c3940f73db48b514d00d87442aeaff6cc0211
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 30 21:27:39 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 12 21:21:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=070c3940

llvm.eclass: Do not prepend /usr/bin to PATH, #622866

 eclass/llvm.eclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index fc09a7d9598..d9518fe6226 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.eclass
@@ -159,7 +159,13 @@ llvm_pkg_setup() {
        debug-print-function ${FUNCNAME} "${@}"
 
        if [[ ${MERGE_TYPE} != binary ]]; then
-               export PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT})/bin:${PATH}
+               local llvm_prefix=$(get_llvm_prefix "${LLVM_MAX_SLOT}")
+
+               # do not prepend /usr/bin, it's not necessary and breaks other
+               # prepends, https://bugs.gentoo.org/622866
+               if [[ ${llvm_prefix} != ${EPREFIX}/usr ]]; then
+                       export PATH=${llvm_prefix}/bin:${PATH}
+               fi
        fi
 }
 

Reply via email to