From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C8843159C96 for ; Mon, 22 Jul 2024 15:06:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F9B9E2A5C; Mon, 22 Jul 2024 15:05:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D620E2A57 for ; Mon, 22 Jul 2024 15:05:55 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] llvm-r1.eclass: Do not default-enable unkeyworded slots Date: Mon, 22 Jul 2024 17:05:49 +0200 Message-ID: <20240722150549.102028-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.45.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 6f7fcd75-2b17-4dec-8dda-d835f2be9689 X-Archives-Hash: abc91d3c313809fff51e4110c01e85db 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 --- 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