• [gentoo-dev] [PATCH 2/2] cargo.eclass: Add _cargo_check_initialized to

    From Christopher Fore@21:1/5 to All on Sun Apr 13 03:00:01 2025
    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@posteo.net>
    ---
    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
    --
    2.49.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)