diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2020-06-23 17:25:07 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2020-06-23 17:33:00 -0700 |
commit | 2f21153a85d43ea466a3289a833f35f1049314cf (patch) | |
tree | db3a4e349027c2a643a02652b4fc272e1e21c2f9 /bin | |
parent | EbuildPhase._elog: _set_nonblocking(build_logger.stdin.fileno()) (diff) | |
download | portage-2f21153a85d43ea466a3289a833f35f1049314cf.tar.gz portage-2f21153a85d43ea466a3289a833f35f1049314cf.tar.bz2 portage-2f21153a85d43ea466a3289a833f35f1049314cf.zip |
ecompress: fix "Argument list too long" for sed (bug 727522)
Use sed -f to feed commands to sed via stdin, in order to avoid
the "Argument list too long" error reported in bug 727522.
Fixes: 5508bf7a6db5 ("ecompress: ignore docompress -x files in precompressed QA check (bug 721516)")
Bug: https://bugs.gentoo.org/727522
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ecompress | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ecompress b/bin/ecompress index 7aabc8e4c..1ab07ccd7 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -38,9 +38,10 @@ while [[ $# -gt 0 ]] ; do if [[ ${#skip_files[@]} -gt 0 && -s ${T}/.ecompress_had_precompressed ]]; then sed_args=() for f in "${skip_files[@]}"; do - sed_args+=(-e "s|^${f}\$||") + sed_args+=("s|^${f}\$||;") done - sed "${sed_args[@]}" -e '/^$/d' -i "${T}/.ecompress_had_precompressed" || die + sed_args+=('/^$/d') + sed -f - -i "${T}/.ecompress_had_precompressed" <<< "${sed_args[@]}" || die fi exit 0 |