1 |
commit: a4336dd925767f1a78d7d046110fd7462f676d8d |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 30 08:03:44 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 30 08:03:44 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a4336dd9 |
7 |
|
8 |
ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS |
9 |
|
10 |
This will fix bug #372183. |
11 |
|
12 |
--- |
13 |
bin/ebuild-helpers/ecompress | 5 ++++- |
14 |
1 files changed, 4 insertions(+), 1 deletions(-) |
15 |
|
16 |
diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress |
17 |
index de81b44..9ff1c56 100755 |
18 |
--- a/bin/ebuild-helpers/ecompress |
19 |
+++ b/bin/ebuild-helpers/ecompress |
20 |
@@ -80,7 +80,10 @@ case $1 in |
21 |
# if it cannot actually compress the file |
22 |
echo {0..1000} > compressme |
23 |
${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme > /dev/null |
24 |
- suffix=$(ls compressme*) |
25 |
+ # If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid |
26 |
+ # having our glob match the uncompressed file here. |
27 |
+ suffix=$(echo compressme.*) |
28 |
+ [[ -z $suffix ]] && suffix=$(echo compressme*) |
29 |
suffix=${suffix#compressme} |
30 |
cd / |
31 |
rm -rf "${tmpdir}" |