We added support for not compressing files below a certain size (since the
speed/size/etc... tradeoffs didn't make sense), but it was only for man
pages and old EAPI's.
Add the logic to the newer EAPIs and apply to all compressed paths.
URL: http://bugs.gentoo.org/169260
# Queue up for compression.
# ecompress{,dir} doesn't like to be called with empty argument lists.
- [[ ${#incl_d[@]} -gt 0 ]] && ecompressdir --queue "${incl_d[@]}"
+ [[ ${#incl_d[@]} -gt 0 ]] && ecompressdir --limit ${PORTAGE_DOCOMPRESS_SIZE_LIMIT:-0} --queue "${incl_d[@]}"
[[ ${#incl_f[@]} -gt 0 ]] && ecompress --queue "${incl_f[@]/#/${ED}}"
[[ ${#exclude[@]} -gt 0 ]] && ecompressdir --ignore "${exclude[@]}"
return 0
export LIBOPTIONS="-m0644"
export DIROPTIONS="-m0755"
export MOPREFIX=${PN}
+# Do not compress files which are smaller than this (in bytes). #169260
+export PORTAGE_DOCOMPRESS_SIZE_LIMIT="128"
declare -a PORTAGE_DOCOMPRESS=( /usr/share/{doc,info,man} )
declare -a PORTAGE_DOCOMPRESS_SKIP=( /usr/share/doc/${PF}/html )
(
if has --exclude-init-phases $* ; then
unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_ \
- PORTAGE_DOCOMPRESS PORTAGE_DOCOMPRESS_SKIP
+ PORTAGE_DOCOMPRESS_SIZE_LIMIT PORTAGE_DOCOMPRESS \
+ PORTAGE_DOCOMPRESS_SKIP
if [[ -n $PYTHONPATH &&
${PYTHONPATH%%:*} -ef $PORTAGE_PYM_PATH ]] ; then
if [[ $PYTHONPATH == *:* ]] ; then