Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sun, 01 Dec 2013 07:22:57
Message-Id: 1385882460.e365ea81ad835ef2853e29925047d8ecb2754941.vapier@gentoo
1 commit: e365ea81ad835ef2853e29925047d8ecb2754941
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 1 07:21:00 2013 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 1 07:21:00 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e365ea81
7
8 docompress: add --limit support with newer EAPIs
9
10 We added support for not compressing files below a certain size (since the
11 speed/size/etc... tradeoffs didn't make sense), but it was only for man
12 pages and old EAPI's.
13
14 Add the logic to the newer EAPIs and apply to all compressed paths.
15
16 URL: http://bugs.gentoo.org/169260
17
18 ---
19 bin/misc-functions.sh | 2 +-
20 bin/phase-helpers.sh | 2 ++
21 bin/save-ebuild-env.sh | 3 ++-
22 3 files changed, 5 insertions(+), 2 deletions(-)
23
24 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
25 index 771bd0a..bd99def 100755
26 --- a/bin/misc-functions.sh
27 +++ b/bin/misc-functions.sh
28 @@ -156,7 +156,7 @@ prepcompress() {
29
30 # Queue up for compression.
31 # ecompress{,dir} doesn't like to be called with empty argument lists.
32 - [[ ${#incl_d[@]} -gt 0 ]] && ecompressdir --queue "${incl_d[@]}"
33 + [[ ${#incl_d[@]} -gt 0 ]] && ecompressdir --limit ${PORTAGE_DOCOMPRESS_SIZE_LIMIT:-0} --queue "${incl_d[@]}"
34 [[ ${#incl_f[@]} -gt 0 ]] && ecompress --queue "${incl_f[@]/#/${ED}}"
35 [[ ${#exclude[@]} -gt 0 ]] && ecompressdir --ignore "${exclude[@]}"
36 return 0
37
38 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
39 index d03a4d7..ec48c94 100644
40 --- a/bin/phase-helpers.sh
41 +++ b/bin/phase-helpers.sh
42 @@ -11,6 +11,8 @@ export EXEOPTIONS="-m0755"
43 export LIBOPTIONS="-m0644"
44 export DIROPTIONS="-m0755"
45 export MOPREFIX=${PN}
46 +# Do not compress files which are smaller than this (in bytes). #169260
47 +export PORTAGE_DOCOMPRESS_SIZE_LIMIT="128"
48 declare -a PORTAGE_DOCOMPRESS=( /usr/share/{doc,info,man} )
49 declare -a PORTAGE_DOCOMPRESS_SKIP=( /usr/share/doc/${PF}/html )
50
51
52 diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
53 index 2a3d5ea..7a31b89 100644
54 --- a/bin/save-ebuild-env.sh
55 +++ b/bin/save-ebuild-env.sh
56 @@ -14,7 +14,8 @@ __save_ebuild_env() {
57 (
58 if has --exclude-init-phases $* ; then
59 unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_ \
60 - PORTAGE_DOCOMPRESS PORTAGE_DOCOMPRESS_SKIP
61 + PORTAGE_DOCOMPRESS_SIZE_LIMIT PORTAGE_DOCOMPRESS \
62 + PORTAGE_DOCOMPRESS_SKIP
63 if [[ -n $PYTHONPATH &&
64 ${PYTHONPATH%%:*} -ef $PORTAGE_PYM_PATH ]] ; then
65 if [[ $PYTHONPATH == *:* ]] ; then