summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-12 13:07:51 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-12 19:07:42 +1000
commit34b74faa06a90bf9d4f62ecfca746b380d60517a (patch)
tree2921fb46dc1b63bf48bb99594e0499b096906766 /eclass
parentkernel-build.eclass: install x509.genkey and everything else in certs/ (diff)
downloadgentoo-34b74faa06a90bf9d4f62ecfca746b380d60517a.tar.gz
gentoo-34b74faa06a90bf9d4f62ecfca746b380d60517a.tar.bz2
gentoo-34b74faa06a90bf9d4f62ecfca746b380d60517a.zip
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 <kangie@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/rust.eclass27
1 files 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