From: Zac Medico Date: Thu, 30 Jun 2011 08:03:44 +0000 (-0700) Subject: ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS X-Git-Tag: v2.2.0_alpha42~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4336dd925767f1a78d7d046110fd7462f676d8d;p=portage.git ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS This will fix bug #372183. --- 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}"