From a4336dd925767f1a78d7d046110fd7462f676d8d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 30 Jun 2011 01:03:44 -0700 Subject: ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS This will fix bug #372183. --- bin/ebuild-helpers/ecompress | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress index de81b4484..9ff1c563f 100755 --- a/bin/ebuild-helpers/ecompress +++ b/bin/ebuild-helpers/ecompress @@ -80,7 +80,10 @@ case $1 in # if it cannot actually compress the file echo {0..1000} > compressme ${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme > /dev/null - suffix=$(ls compressme*) + # If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid + # having our glob match the uncompressed file here. + suffix=$(echo compressme.*) + [[ -z $suffix ]] && suffix=$(echo compressme*) suffix=${suffix#compressme} cd / rm -rf "${tmpdir}" -- cgit v1.2.3-1-g7c22