From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH] llvm-r1.eclass: Do not default-enable unkeyworded slots
Date: Mon, 22 Jul 2024 17:05:49 +0200 [thread overview]
Message-ID: <20240722150549.102028-1-mgorny@gentoo.org> (raw)
Change the IUSE defaults logic to default-enable the *oldest* ~arch
version rather than the newest one, when no stable slots are supported.
Since we only except a single ~arch version to exist, this effectively
prevents the eclass from default-enabling the unkeyworded snapshots.
Closes: https://bugs.gentoo.org/935681
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/llvm-r1.eclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/eclass/llvm-r1.eclass b/eclass/llvm-r1.eclass
index 075df9218be8..ea8ecff2890e 100644
--- a/eclass/llvm-r1.eclass
+++ b/eclass/llvm-r1.eclass
@@ -123,11 +123,16 @@ _llvm_set_globals() {
fi
if [[ ${stable[@]} ]]; then
+ # If there is at least one stable slot supported, then enable
+ # the newest stable slot by default.
IUSE="+llvm_slot_${stable[-1]}"
unset 'stable[-1]'
else
- IUSE="+llvm_slot_${unstable[-1]}"
- unset 'unstable[-1]'
+ # Otherwise, enable the "oldest" ~arch slot. We really only
+ # expect a single ~arch version, so this primarily prevents
+ # defaulting to non-keyworded slots.
+ IUSE="+llvm_slot_${unstable[0]}"
+ unset 'unstable[0]'
fi
local nondefault=( "${stable[@]}" "${unstable[@]}" )
IUSE+=" ${nondefault[*]/#/llvm_slot_}"
--
2.45.2
reply other threads:[~2024-07-22 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240722150549.102028-1-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