* [gentoo-dev] [PATCH] llvm-r1.eclass: Do not default-enable unkeyworded slots
@ 2024-07-22 15:05 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-07-22 15:05 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-22 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 15:05 [gentoo-dev] [PATCH] llvm-r1.eclass: Do not default-enable unkeyworded slots Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox