Looks like the @rust-rebuild set catches all installed Rust compilers: $ emerge -1v @rust-rebuild These are the packages that would be merged, in order: Calculating dependencies ... ... done! Dependency resolution took 18.62 s (backtrack: 1/20). [ebuild R ~] dev-lang/rust-1.86.0-r1:1.86.0::gentoo USE="clippy rust-analyzer rust-src rustfmt system-llvm verify-sig (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto -test -wasm" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly (X86) XCore Xtensa -CSKY -DirectX -M68k -SPIRV" 269236 KiB [ebuild R ] dev-lang/rust-1.82.0-r102:1.82.0::gentoo USE="clippy rust-analyzer rust-src rustfmt system-llvm verify-sig (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto (-miri) -nightly (-parallel-compiler) -test -wasm" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly (X86) XCore Xtensa -CSKY -DirectX -M68k -SPIRV" 214620 KiB [ebuild R ] dev-lang/rust-1.83.0-r2:1.83.0::gentoo USE="clippy rust-analyzer rust-src rustfmt system-llvm verify-sig (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto (-miri) -nightly (-parallel-compiler) -test -wasm" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly (X86) XCore Xtensa -CSKY -DirectX -M68k -SPIRV" 345517 KiB [ebuild R ~] dev-lang/rust-1.84.0-r1:1.84.0::gentoo USE="clippy rust-analyzer rust-src rustfmt system-llvm verify-sig (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto (-miri) -nightly (-parallel-compiler) -test -wasm" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly (X86) XCore Xtensa -CSKY -DirectX -M68k -SPIRV" 346675 KiB [ebuild R ~] dev-lang/rust-1.85.1:1.85.1::gentoo USE="clippy rust-analyzer rust-src rustfmt system-llvm verify-sig (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto -test -wasm" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly (X86) XCore Xtensa -CSKY -DirectX -M68k -SPIRV" 267608 KiB Not that the set makes much sense, given it includes not only packages worth rebuilding, but also 1. packages that are already built against the newest Rust version, and 2. packages that were built against their RUST_MAX_VER.
https://github.com/gentoo/portage/pull/1434 handles the main issue. The other two bits mean we probably need a custom set class for that. Can you file that separately? (though maybe not much point if we just make the dep changes discussed earlier on IRC; see bug 943206)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a423c715556ec5d21936e50009db48b44690c02 commit 4a423c715556ec5d21936e50009db48b44690c02 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-04-16 06:53:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-24 21:21:51 +0000 sets: VariableSet: honour 'excludes' This allows defining @golang-rebuild and @rust-rebuild in such a way that dev-lang/go and dev-lang/rust (and -bin) are excluded, as users don't usually want to rebuild the toolchain there, just packages affected by static linking and such. For VariableSet: * Make 'excludes' do something for VariableSet where variable is *DEPEND: operate on the actual *DEPEND match, not the package in question though. I'm not convinced this is super-useful as it is, but I wanted to try preserve 'excludes' semantics as it is for other variables than *DEPEND. * Add 'excludes_output' which drops matches on the original package being tested/filtered. e.g. variable = BDEPEND includes = dev-lang/rust excludes_output = dev-lang/rust will include any package with dev-lang/rust in BDEPEND, unless that package is itself dev-lang/rust. For sets/portage.conf: * Make '@rust-rebuild' include packages with BDEPEND on dev-lang/rust or dev-lang/rust-bin, but exclude dev-lang/rust or dev-lang/rust-bin themselves from being included in the set. * Drop obsolete virtual/rust from '@rust-rebuild'. Bug: https://bugs.gentoo.org/906044 Bug: https://bugs.gentoo.org/919751 Bug: https://bugs.gentoo.org/953884 Signed-off-by: Sam James <sam@gentoo.org> cnf/sets/portage.conf | 3 +- lib/portage/_sets/dbapi.py | 54 ++++++++++++++++++++---- lib/portage/tests/sets/base/test_variable_set.py | 20 ++++++++- 3 files changed, 65 insertions(+), 12 deletions(-)