nginx.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.

Closes: https://bugs.gentoo.org/978940
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-07-10 17:21:59 +01:00
parent b982445cd7
commit c3dcad735f

View File

@@ -376,7 +376,8 @@ _ngx_set_mod_required_use() {
if has "${mod}" "${_NGX_MODULES[@]#+}"; then
result=''
# Feed comma-delimited dependencies into the dep_list array.
IFS=, read -ra dep_list <<< "${_NGX_DEP_TABLE[${mod}]}"
mapfile -td ',' dep_list < <(printf %s "${_NGX_DEP_TABLE[${mod}]}")
for dep in "${dep_list[@]}"; do
has "${dep}" "${_NGX_MODULES[@]#+}" &&
result+=" nginx_modules_${dep}"