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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D85FF1581D8 for ; Wed, 4 Dec 2024 11:34:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D743EE0819; Wed, 4 Dec 2024 11:34:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 3FAEDE0819 for ; Wed, 4 Dec 2024 11:34:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 3CD5C340BEF for ; Wed, 4 Dec 2024 11:34:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 97BE9F96 for ; Wed, 4 Dec 2024 11:34:46 +0000 (UTC) From: "Matt Jolly" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Jolly" Message-ID: <1733312041.7687cc69cda0158af53edae6d89944653760dea9.kangie@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/rust.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kangie X-VCS-Committer-Name: Matt Jolly X-VCS-Revision: 7687cc69cda0158af53edae6d89944653760dea9 X-VCS-Branch: master Date: Wed, 4 Dec 2024 11:34:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dabf3d0f-909c-4b11-b4cd-11c82ff87130 X-Archives-Hash: bdca18fcd6fbcf72ce4468eabbfd50c5 commit: 7687cc69cda0158af53edae6d89944653760dea9 Author: Matt Jolly gentoo org> AuthorDate: Wed Dec 4 11:34:01 2024 +0000 Commit: Matt Jolly gentoo org> CommitDate: Wed Dec 4 11:34:01 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7687cc69 Revert "rust.eclass: add ERUST_{SLOT,TYPE} user variables" This reverts commit 4ff6bf33c94566b2acc07b75712094d567c77fc9. My branch was dirty, this is still under review. Signed-off-by: Matt Jolly gentoo.org> eclass/rust.eclass | 49 +++++-------------------------------------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/eclass/rust.eclass b/eclass/rust.eclass index 991a9cdb7f14..71cbb4b24f8c 100644 --- a/eclass/rust.eclass +++ b/eclass/rust.eclass @@ -98,26 +98,6 @@ declare -a -g -r _RUST_SLOTS_ORDERED=( "1.54.0" ) -# == user control knobs == - -# @ECLASS_VARIABLE: ERUST_SLOT -# @USER_VARIABLE -# @DESCRIPTION: -# Specify the version (slot) of Rust to be used by the package. This is -# useful for troubleshooting and debugging purposes; If unset, the newest -# acceptable Rust version will be used. May be combined with ERUST_TYPE. -# This variable must not be set in ebuilds. - -# @ECLASS_VARIABLE: ERUST_TYPE -# @USER_VARIABLE -# @DESCRIPTION: -# Specify the type of Rust to be used by the package from options: -# 'source' or 'binary' (-bin). This is useful for troubleshooting and -# debugging purposes. If unset, the standard eclass logic will be used -# to determine the type of Rust to use (i.e. prefer source if binary -# is also available). May be combined with ERUST_SLOT. -# This variable must not be set in ebuilds. - # == control variables == # @ECLASS_VARIABLE: RUST_MAX_VER @@ -352,10 +332,6 @@ _get_rust_slot() { fi fi - if [[ -n "${ERUST_SLOT}" && "${slot}" != "${ERUST_SLOT}" ]]; then - continue - fi - # If we're in LLVM mode we can skip any slots that don't match the selected USE if [[ -n "${RUST_NEEDS_LLVM}" ]]; then if [[ "${llvm_slot}" != "${llvm_r1_slot}" ]]; then @@ -369,27 +345,12 @@ _get_rust_slot() { rust_check_deps && return else local usedep="${RUST_REQ_USE+[${RUST_REQ_USE}]}" - # When checking for installed packages prefer the source package; + # When checking for installed packages prefer the non `-bin` package # if effort was put into building it we should use it. - local rust_pkgs - case "${ERUST_TYPE}" in - source) - rust_pkgs=( - "dev-lang/rust:${slot}${usedep}" - ) - ;; - binary) - rust_pkgs=( - "dev-lang/rust-bin:${slot}${usedep}" - ) - ;; - *) - rust_pkgs=( - "dev-lang/rust:${slot}${usedep}" - "dev-lang/rust-bin:${slot}${usedep}" - ) - ;; - esac + local rust_pkgs=( + "dev-lang/rust:${slot}${usedep}" + "dev-lang/rust-bin:${slot}${usedep}" + ) local _pkg for _pkg in "${rust_pkgs[@]}"; do if has_version "${hv_switch}" "${_pkg}"; then