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 BBE07158042 for ; Tue, 12 Nov 2024 09:09:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DDF1CE07EC; Tue, 12 Nov 2024 09:09:37 +0000 (UTC) Received: from smtp.gentoo.org (dev.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C6468E07EC for ; Tue, 12 Nov 2024 09:09:37 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8AABB340C77 for ; Tue, 12 Nov 2024 09:09:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C180F16D2 for ; Tue, 12 Nov 2024 09:09:34 +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: <1731402462.34b74faa06a90bf9d4f62ecfca746b380d60517a.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: 34b74faa06a90bf9d4f62ecfca746b380d60517a X-VCS-Branch: master Date: Tue, 12 Nov 2024 09:09:34 +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: 4de553c0-998f-49d5-9b73-e3b39b504d02 X-Archives-Hash: f007c3004fc31af3af9f79fc1b68b43e commit: 34b74faa06a90bf9d4f62ecfca746b380d60517a Author: Matt Jolly gentoo org> AuthorDate: Tue Nov 12 03:07:51 2024 +0000 Commit: Matt Jolly gentoo org> CommitDate: Tue Nov 12 09:07:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b74faa rust.eclass: revert simplified dependency simplification The simplified dependency specification for cases where no RUST_MAX_SLOT is set is the desired end state, however the edge case where portage drops blockers with `--keep-going` has an unfortunate interaction where both packages are installed simultaneously, e.g. dev-lang/rust-1.82.0:stable and dev-lang/rust-1.82.0:1.82.0, and there's no easy way for end users to resolve that as the legacy (though masked) ebuilds will meet the simple Rust dependency. Both packages install rlibs with different hashes in them to the same path (as shown below) resulting in failures when a package attempts to link against an rlib and finds two. 1.82.0: .../x86_64-unknown-linux-gnu/lib/libunwind-fc4fe814489209c6.rlib 1.82.0-r100: .../x86_64-unknown-linux-gnu/lib/libunwind-ab65e6747cbe4a5a.rlib Bug: https://bugs.gentoo.org/943143 Bug: https://bugs.gentoo.org/943206 Signed-off-by: Matt Jolly gentoo.org> eclass/rust.eclass | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/eclass/rust.eclass b/eclass/rust.eclass index 3837c3a1f6c5..3a8a93718787 100644 --- a/eclass/rust.eclass +++ b/eclass/rust.eclass @@ -196,25 +196,22 @@ _rust_set_globals() { local usedep="${RUST_REQ_USE+[${RUST_REQ_USE}]}" # If we're not using LLVM, we can just generate a simple Rust dependency + # In time we need to implement trivial dependencies + # (>=RUST_MIN_VER) where RUST_MAX_VER isnt't set, + # however the previous attempt to do this ran into issues + # where `emerge ... --keep-going` ate legacy non-slotted + # Rust blockers resutling in the non-slotted version never + # being removed and breaking builds. #943206 #943143 if [[ -z "${RUST_NEEDS_LLVM}" ]]; then rust_dep=( "|| (" ) - # We can be more flexible if we generate a simpler, open-ended dependency - # when we don't have a max version set. - if [[ -z "${RUST_MAX_VER}" ]]; then + # depend on each slot between RUST_MIN_VER and RUST_MAX_VER; it's a bit specific but + # won't hurt as we only ever add newer Rust slots. + for slot in "${_RUST_SLOTS[@]}"; do rust_dep+=( - ">=dev-lang/rust-bin-${RUST_MIN_VER}:*${usedep}" - ">=dev-lang/rust-${RUST_MIN_VER}:*${usedep}" + "dev-lang/rust-bin:${slot}${usedep}" + "dev-lang/rust:${slot}${usedep}" ) - else - # depend on each slot between RUST_MIN_VER and RUST_MAX_VER; it's a bit specific but - # won't hurt as we only ever add newer Rust slots. - for slot in "${_RUST_SLOTS[@]}"; do - rust_dep+=( - "dev-lang/rust-bin:${slot}${usedep}" - "dev-lang/rust:${slot}${usedep}" - ) - done - fi + done rust_dep+=( ")" ) RUST_DEPEND="${rust_dep[*]}" else