sec-keys.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/978941
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-07-10 17:22:30 +01:00
parent c3dcad735f
commit 55db1fb17f

View File

@@ -68,7 +68,7 @@ _sec_keys_set_globals() {
for key in "${SEC_KEYS_VALIDPGPKEYS[@]}"; do
fingerprint=${key%%:*}
name=${key#${fingerprint}:}; name=${name%%:*}
IFS=, read -r -a locations <<<"${key##*:}"
mapfile -td ',' locations < <(printf %s "${key##*:}")
[[ ${locations[@]} ]] || die "${ECLASS}: ${name}: PGP key remote is mandatory"
for loc in "${locations[@]}"; do
case ${loc} in