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