Prompted by https://bugs.gentoo.org/945751#c2 but been on my mind otherwise. It'd be nice if we had an ERUSTC or RUSTC variable we can set to say "please use this version of rustc, assuming it's compatible" (i.e. it would still have to pass RUST_MIN_SLOT/RUST_MAX_SLOT checks, it would just affect iteration order; we would check the slot referenced by $VAR first, then do the usual iteration). Would also be nice if could do "-bin" or something in there to prefer bin (or not).
Another option could be to (as well?) prefer the eselect-ed Rust if suitable over iteration.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ff6bf33c94566b2acc07b75712094d567c77fc9 commit 4ff6bf33c94566b2acc07b75712094d567c77fc9 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-12-03 12:06:30 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-12-04 11:30:31 +0000 rust.eclass: add ERUST_{SLOT,TYPE} user variables These variables enable users (though most likely Gentoo developers) to override the selection of the Rust implementation by the eclass. This means that _only_ the specified ERUST_SLOT and/or ERUST_TYPE ('source' or 'binary') will be checked for, with the eclass `die`ing with "No Rust slot satisfying the package's dependencies..." if the selected impl is not available. These variables are intended to enable reproducing bugs and testing packages against specific dev-lang/rust{,-bin} packages; they must not be set in ebuilds. Closes: https://bugs.gentoo.org/945752 Signed-off-by: Matt Jolly <kangie@gentoo.org> eclass/rust.eclass | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-)
Commit accidentally pushed; reverted in 7687cc69cda0158af53edae6d89944653760dea9 . Minor changes requested and slightly more time for feedback before merging this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1ef411b6e2cab683bbaf83a03f44b22fd46cede commit d1ef411b6e2cab683bbaf83a03f44b22fd46cede Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-12-03 12:22:37 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-12-08 23:34:01 +0000 rust.eclass: add ERUST_{SLOT,TYPE}_OVERRIDE user variables These variables enable users (though most likely Gentoo developers) to override the selection of the Rust implementation by the eclass. This means that _only_ the specified SLOT and/or TYPE ('source'/'binary') will be checked for, with the eclass `die`ing with "No Rust slot satisfying the package's dependencies..." if the selected impl is not available. These variables are intended to enable reproducing bugs and testing packages against specific dev-lang/rust{,-bin} packages; they must not be set in ebuilds. Closes: https://bugs.gentoo.org/945752 Signed-off-by: Matt Jolly <kangie@gentoo.org> eclass/rust.eclass | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-)