public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/3] llvm.eclass: Remove remnants of slot :0 support
Date: Tue, 26 May 2020 09:44:31 +0200	[thread overview]
Message-ID: <20200526074432.136139-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20200526074432.136139-1-mgorny@gentoo.org>

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/llvm.eclass | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index a2da231b035a..4f968dc39f87 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.eclass
@@ -71,6 +71,10 @@ EXPORT_FUNCTIONS pkg_setup
 
 if [[ ! ${_LLVM_ECLASS} ]]; then
 
+# make sure that the versions installing straight into /usr/bin
+# are uninstalled
+DEPEND="!!sys-devel/llvm:0"
+
 # @ECLASS-VARIABLE: LLVM_MAX_SLOT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -173,13 +177,6 @@ get_llvm_prefix() {
 		die "${FUNCNAME}: invalid max_slot=${max_slot}"
 	fi
 
-	# fallback to :0
-	# assume it's always <= 4 (the lower max_slot allowed)
-	if has_version ${hv_switch} "sys-devel/llvm:0"; then
-		echo "${prefix}/usr"
-		return
-	fi
-
 	die "No LLVM slot${1:+ <= ${1}} found installed!"
 }
 
@@ -202,12 +199,7 @@ llvm_pkg_setup() {
 
 	if [[ ${MERGE_TYPE} != binary ]]; then
 		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
+		export PATH=${llvm_prefix}/bin:${PATH}
 	fi
 }
 
-- 
2.26.2



  parent reply	other threads:[~2020-05-26  7:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  7:44 [gentoo-dev] [PATCH 0/3] llvm.eclass: Fix prepending path and add tests Michał Górny
2020-05-26  7:44 ` [gentoo-dev] [PATCH 1/3] llvm.eclass: Add initial tests Michał Górny
2020-05-26  7:44 ` Michał Górny [this message]
2020-05-26  7:44 ` [gentoo-dev] [PATCH 3/3] llvm.eclass: Fix prepending LLVM path before system paths Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200526074432.136139-3-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox