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@posteo.net>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Christopher Fore
2025-04-13 00:53:50 +00:00
committed by Sam James
parent e7aa0ac74a
commit ba3dffd322

View File

@@ -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