projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86f285f
)
ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS
author
Zac Medico
<zmedico@gentoo.org>
Thu, 30 Jun 2011 08:03:44 +0000
(
01:03
-0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 30 Jun 2011 08:03:44 +0000
(
01:03
-0700)
This will fix bug #372183.
bin/ebuild-helpers/ecompress
patch
|
blob
|
history
diff --git
a/bin/ebuild-helpers/ecompress
b/bin/ebuild-helpers/ecompress
index de81b4484ec7d65c64428283c7a029ef0268c2d2..9ff1c563fca629e2dc034ddd4a5872523f1524a9 100755
(executable)
--- 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}"