When RUST_MIN_VER is set (and not RUST_MAX_VER), we can do a bit better with how we express the dependency. Right now, we generate for, say, RUST_MIN_VER=1.78: ``` || ( dev-lang/rust:1.81 dev-lang/rust-bin:1.81 dev-lang/rust:1.80 dev-lang/rust-bin:1.80 dev-lang/rust:1.79 dev-lang/rust-bin:1.79 dev-lang/rust:1.78 dev-lang/rust-bin:1.78 ) ``` This is both: a) unnecessarily large (although who cares), and more importantly b) restrictive when new versions are added to tree. If we instead expand RUST_MIN_VER when it is set and RUST_MAX_VER isn't to `|| ( >=dev-lang/rust-1.78:* >=dev-lang/rust-bin-1.78:* )`, we allow new slots of Rust to satisfy it immediately without people having to revbump to allow upgrades/depcleaning of old slots.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9224c0acf8aa541c49de424042c88e87f0e76e26 commit 9224c0acf8aa541c49de424042c88e87f0e76e26 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-11-10 01:24:33 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-11-11 08:49:16 +0000 eclass: update rust usedep handling; address feedback - Inherit llvm-r1 where required and let it die if LLVM_COMPAT is not set. - New variable: RUST_MULTILIB; if set will generate a multilib usedep for supported rust slots. - RUST_USEDEP -> RUST_REQ_USE to be consistent with other eclasses (ebuild updates handled in a followup commit). - Tidyup & address feedback - Improve RUST_MIN_VER (only) dependency specification Closes: https://bugs.gentoo.org/943206 Signed-off-by: Matt Jolly <kangie@gentoo.org> eclass/rust.eclass | 126 ++++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 60 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b74faa06a90bf9d4f62ecfca746b380d60517a commit 34b74faa06a90bf9d4f62ecfca746b380d60517a Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-11-12 03:07:51 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-11-12 09:07:42 +0000 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> eclass/rust.eclass | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-)