commit:     ba3dffd3228188acf098b06d73059f1b02e69cfc
Author:     Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Sun Apr 13 00:53:50 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 19 01:30:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba3dffd3

cargo.eclass: Add _cargo_check_initialized to cargo_live_src_unpack

Currently cargo.eclass does not check if rust_pkg_setup was called in
cargo_live_src_unpack, leading to situations where vague build errors
can show up.

Closes: https://bugs.gentoo.org/953532
Bug: https://bugs.gentoo.org/953515
Signed-off-by: Christopher Fore <csfore <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/cargo.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index ad15da2b51a9..428341d568db 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -561,6 +561,8 @@ cargo_live_src_unpack() {
        [[ "${PV}" == *9999* ]] || die "${FUNCNAME} only allowed in live/9999 
ebuilds"
        [[ "${EBUILD_PHASE}" == unpack ]] || die "${FUNCNAME} only allowed in 
src_unpack"
 
+       _cargo_check_initialized
+
        mkdir -p "${S}" || die
        mkdir -p "${ECARGO_VENDOR}" || die
        mkdir -p "${ECARGO_HOME}" || die

Reply via email to