mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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 <sam@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user