mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
Revert "rust.eclass: revert simplified dependency simplification"
This reverts commit 34b74faa06, i.e.
reapplies the simplified dependency specification.
We had to revert this before because of the collision issues when
switching to slotted Rust where the same Rust version existed before
in a non-slotted variant. We have a sanity check and workaround for that
in pkg_postinst for affected versions now, so there shouldn't be a reason
we can't do this.
This may ease depcleaning older Rust in some cases w/o having to rebuild
packages against new Rust.
Bug: https://bugs.gentoo.org/943143
Bug: https://bugs.gentoo.org/943206
Bug: https://bugs.gentoo.org/953884
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -248,22 +248,25 @@ _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=( "|| (" )
|
||||
# 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
|
||||
# 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
|
||||
rust_dep+=(
|
||||
"dev-lang/rust-bin:${slot}${usedep}"
|
||||
"dev-lang/rust:${slot}${usedep}"
|
||||
">=dev-lang/rust-bin-${RUST_MIN_VER}:*${usedep}"
|
||||
">=dev-lang/rust-${RUST_MIN_VER}:*${usedep}"
|
||||
)
|
||||
done
|
||||
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
|
||||
rust_dep+=( ")" )
|
||||
RUST_DEPEND="${rust_dep[*]}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user