Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/, bin/
Date: Thu, 20 Sep 2018 18:49:32
Message-Id: 1537469295.6da3070ceeea4affce59310a15c6df86c89d1095.mgorny@gentoo
1 commit: 6da3070ceeea4affce59310a15c6df86c89d1095
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 24 15:23:43 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 20 18:48:15 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6da3070c
7
8 Replace implicit doc compression with dir compression in old EAPIs
9
10 Unify the documentation compression methods in all EAPIs to compress
11 per-directory rather than implicitly compress files installed by dodoc,
12 doinfo and doman. Old EAPIs don't provide docompress to control which
13 directories are compressed but they don't say anything about dodoc etc.
14 compressing anything either.
15
16 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
17 Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
18
19 bin/ebuild-helpers/dodoc | 3 +--
20 bin/ebuild-helpers/prepinfo | 3 +--
21 bin/ebuild-helpers/prepman | 35 ++---------------------------------
22 bin/misc-functions.sh | 8 +-------
23 4 files changed, 5 insertions(+), 44 deletions(-)
24
25 diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
26 index 84936e400..e83091045 100755
27 --- a/bin/ebuild-helpers/dodoc
28 +++ b/bin/ebuild-helpers/dodoc
29 @@ -1,5 +1,5 @@
30 #!/bin/bash
31 -# Copyright 1999-2012 Gentoo Foundation
32 +# Copyright 1999-2018 Gentoo Foundation
33 # Distributed under the terms of the GNU General Public License v2
34
35 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
36 @@ -28,7 +28,6 @@ for x in "$@" ; do
37 eqawarn "QA Notice: dodoc argument '${x}' is a directory"
38 elif [ -s "${x}" ] ; then
39 install -m0644 "${x}" "${dir}" || { ((ret|=1)); continue; }
40 - ecompress --queue "${dir}/${x##*/}"
41 elif [ ! -e "${x}" ] ; then
42 echo "!!! ${0##*/}: $x does not exist" 1>&2
43 ((ret|=1))
44
45 diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
46 index eb1b6a7e3..9d33e6e9a 100755
47 --- a/bin/ebuild-helpers/prepinfo
48 +++ b/bin/ebuild-helpers/prepinfo
49 @@ -34,5 +34,4 @@ find "${ED%/}/${infodir#/}" -type d -print0 | while read -r -d $'\0' x ; do
50 rm -f "${x}"/dir{,.info}{,.gz,.bz2}
51 done
52
53 -___eapi_has_docompress && exit 0
54 -exec ecompressdir --queue "${infodir}"
55 +exit 0
56
57 diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
58 index 5e9fe45b6..4c6d47bb2 100755
59 --- a/bin/ebuild-helpers/prepman
60 +++ b/bin/ebuild-helpers/prepman
61 @@ -2,38 +2,7 @@
62 # Copyright 1999-2018 Gentoo Foundation
63 # Distributed under the terms of the GNU General Public License v2
64
65 -# Do not compress man pages which are smaller than this (in bytes). #169260
66 -SIZE_LIMIT='128'
67 -
68 -source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
69 -
70 -if ! ___eapi_has_prefix_variables; then
71 - ED=${D}
72 -fi
73 -
74 -if [[ -z $1 ]] ; then
75 - mandir="${ED%/}/usr/share/man"
76 -else
77 - mandir="${ED%/}/${1#/}/man"
78 -fi
79 -
80 -if [[ ! -d ${mandir} ]] ; then
81 - eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${ED%/}}'"
82 - exit 0
83 -fi
84 -
85 -# replaced by controllable compression in EAPI 4
86 -___eapi_has_docompress && exit 0
87 -
88 -shopt -s nullglob
89 -
90 -really_is_mandir=0
91 -
92 -# use some heuristics to test if this is a real mandir
93 -for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
94 - [[ -d ${subdir} ]] && really_is_mandir=1 && break
95 -done
96 -
97 -[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --limit ${SIZE_LIMIT} --queue "${mandir#${ED%/}}"
98 +# Note: this really does nothing these days. It's going to be banned
99 +# when the last consumers are gone.
100
101 exit 0
102
103 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
104 index d25bc8498..ed66e90ca 100755
105 --- a/bin/misc-functions.sh
106 +++ b/bin/misc-functions.sh
107 @@ -171,12 +171,6 @@ __prepall() {
108 chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
109 fi
110
111 - if ! ___eapi_has_docompress; then
112 - while IFS= read -r -d '' mandir ; do
113 - mandir=${mandir#${ED}}
114 - prepman "${mandir%/man}"
115 - done < <(find "${ED}" -type d -name man -print0)
116 - fi
117 [[ -d ${ED%/}/usr/share/info ]] && prepinfo
118
119 ___eapi_has_dostrip || prepallstrip
120 @@ -245,7 +239,7 @@ install_qa_check() {
121
122 export STRIP_MASK
123 __prepall
124 - ___eapi_has_docompress && prepcompress
125 + prepcompress
126 ecompressdir --dequeue
127 ecompress --dequeue