[PATCH 5/9] sec-keys.eclass: port to esplit.eclass
Sam James <[email protected]> Thu, 9 Jul 2026 22:22:14 +0100
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <1a85cc33c58e113204a9ad764d0dd21b6821ed60.1783632124.git.sam@gentoo.org> |
Avoid global-scope use of a heredoc which requires the use of a temporary file for any size with < EAPI 9 and with large sizes still with >= EAPI 9. In this case, a followup could be to just use a while/read loop. Closes: https://bugs.gentoo.org/978941 Signed-off-by: Sam James <[email protected]> --- eclass/sec-keys.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/sec-keys.eclass b/eclass/sec-keys.eclass index ca1b4de572412..cc85423af10e0 100644 --- a/eclass/sec-keys.eclass +++ b/eclass/sec-keys.eclass @@ -43,7 +43,7 @@ esac if [[ ! ${_SEC_KEYS_ECLASS} ]]; then _SEC_KEYS_ECLASS=1 -inherit eapi9-pipestatus edo +inherit eapi9-pipestatus edo esplit # @ECLASS_VARIABLE: SEC_KEYS_VALIDPGPKEYS # @PRE_INHERIT @@ -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 -d '' locations < <(IFS=, esplit "${key##*:}") [[ ${locations[@]} ]] || die "${ECLASS}: ${name}: PGP key remote is mandatory" for loc in "${locations[@]}"; do case ${loc} in -- 2.55.0