diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-09-27 15:41:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-09-27 15:41:53 +0000 |
commit | b4e41bc9eb7f6b5da44ff7bb6bddfdad714c4e7c (patch) | |
tree | 2fc5ce7f2aefc8f7a5397a6a32fe07b9ea526f8d | |
parent | 3d10488c9d0ddd87d883732de3e657c96c26da2a (diff) | |
download | portage-b4e41bc9eb7f6b5da44ff7bb6bddfdad714c4e7c.tar.gz portage-b4e41bc9eb7f6b5da44ff7bb6bddfdad714c4e7c.tar.bz2 portage-b4e41bc9eb7f6b5da44ff7bb6bddfdad714c4e7c.zip |
Bug #193486 - Use xargs to avoid 'bash: /bin/rm: Argument list too long'
errors. This patch uses a weird tr '\001' '\000' workaround since bash
doesn't echo null bytes like one might expect. (trunk r7848)
svn path=/main/branches/2.1.2/; revision=7849
-rwxr-xr-x | bin/ecompress | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ecompress b/bin/ecompress index 6eb1d5df7..d2d6553a3 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -48,7 +48,8 @@ case $1 in # delete it so that the compressor doesn't whine (bzip2 will # complain and skip, gzip will prompt for input) suffix=$(ecompress --suffix) - [[ -n ${suffix} ]] && rm -f "${@/%/${suffix}}" + [[ -n ${suffix} ]] && echo ${@/%/${suffix}$'\001'} | \ + tr '\001' '\000' | ${XARGS} -0 rm -f # Finally, let's actually do some real work exec "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@" ;; |