commit: 8c2aba680ad0a767829c1133189792081671f54d
Author: Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 4 15:50:38 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 4 17:08:32 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c2aba68
cargo.eclass: fix live unpack to use selected cargo
Eveywhere, we use ${CARGO} as set by the rust toolchain setup, except
one place. This caused issues such as erroring out in at least one
reported case with "cargo: command not found" (when using --root,
apparently). It would also certainly not respect RUST_MIN_VER /
RUST_MAX_VER.
Ensure we consistently use the variable referencing the $CARGO that is
definitely guaranteed to exist.
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/cargo.eclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 95d485ab20c3..d93ae1723470 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -603,12 +603,12 @@ cargo_live_src_unpack() {
export CARGO_HOME="${ECARGO_REGISTRY_DIR}"
# Absence of quotes around offline arg is intentional, as cargo bails
out if it encounters ''
- einfo "cargo fetch ${offline:+--offline}"
- cargo fetch ${offline:+--offline} || die #nowarn
+ einfo "${CARGO} fetch ${offline:+--offline}"
+ "${CARGO}" fetch ${offline:+--offline} || die #nowarn
# Let cargo copy all required crates to "${WORKDIR}" for offline use in
later phases.
- einfo "cargo vendor ${offline:+--offline} ${ECARGO_VENDOR}"
- cargo vendor ${offline:+--offline} "${ECARGO_VENDOR}" || die #nowarn
+ einfo "${CARGO} vendor ${offline:+--offline} ${ECARGO_VENDOR}"
+ "${CARGO}" vendor ${offline:+--offline} "${ECARGO_VENDOR}" || die
#nowarn
# Users may have git checkouts made by cargo.
# While cargo vendors the sources, it still needs git checkout to be
present.