From b982445cd7fb9651381a3aed8d672417962bdb15 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 10 Jul 2026 17:20:59 +0100 Subject: [PATCH] cargo.eclass: avoid heredoc in global scope A heredoc may cause the use of a temporary file with < EAPI 9 and even then still with >= EAPI 9 if the input is large. This becomes a problem if sandboxing is applied to metadata generation. Bug: https://bugs.gentoo.org/978857 Signed-off-by: Sam James --- eclass/cargo.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index bf2a820537878..185531490a25a 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -310,7 +310,7 @@ _cargo_set_crate_uris() { local crate commit crate_uri crate_dir host repo_ext feat_expr for crate in "${!GIT_CRATES[@]}"; do - IFS=';' read -r crate_uri commit crate_dir host <<< "${GIT_CRATES[${crate}]}" || die "${ECLASS}: could not create heredoc" + IFS=';' read -rd '' crate_uri commit crate_dir host < <(printf %s "${GIT_CRATES[${crate}]}") if [[ -z ${host} ]]; then case "${crate_uri}" in