diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-06-30 01:03:44 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-06-30 01:03:44 -0700 |
commit | a4336dd925767f1a78d7d046110fd7462f676d8d (patch) | |
tree | a5480eec82597a0dcebb37820c6363dc4990342c | |
parent | 86f285fe9c94e2a817de077eda7e8744130c412f (diff) | |
download | portage-a4336dd925767f1a78d7d046110fd7462f676d8d.tar.gz portage-a4336dd925767f1a78d7d046110fd7462f676d8d.tar.bz2 portage-a4336dd925767f1a78d7d046110fd7462f676d8d.zip |
ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS
This will fix bug #372183.
-rwxr-xr-x | bin/ebuild-helpers/ecompress | 5 |
1 files changed, 4 insertions, 1 deletions
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}" |