bug 943140 (and some others) show that you get a messy failure where ${CARGO} is unset if e.g. ``` inherit cargo [...] pkg_setup() { custom_thing } ``` because cargo_src_compile calls ${CARGO} but rust_pkg_setup was never called. We should add a sanity check in cargo_src_compile (maybe cargo_src_install too and cargo_src_configure) to check if rust_pkg_setup was called. I think the Python eclasses do something similar.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9393ba8b683e6a055522d81740f94a11a0abfcb4 commit 9393ba8b683e6a055522d81740f94a11a0abfcb4 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-11-10 00:15:54 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-11-11 08:49:15 +0000 cargo.eclass: check for and quote `CARGO` A quick sanity check that `CARGO` is set in appropriate cargo_src_* phase functions will make it easier for users to catch occurrences where pkg_setup does not call rust_pkg_setup. Also inherit llvm-r1 if required and let it die instead of us if the environment is not properly setup. Closes: https://bugs.gentoo.org/943147 Signed-off-by: Matt Jolly <kangie@gentoo.org> eclass/cargo.eclass | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)