• [gentoo-dev] [PATCH] llvm-r1.eclass: Do not default-enable unkeyworded

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Mon Jul 22 17:10:02 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)