aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-24 16:23:43 +0100
committerMichał Górny <mgorny@gentoo.org>2018-09-20 20:48:15 +0200
commit6da3070ceeea4affce59310a15c6df86c89d1095 (patch)
tree7efef06d57ac3b7d3a97d246681f05e890538de5
parentrepoman: Automatically convert copyright to 'Gentoo Authors' (diff)
downloadportage-6da3070ceeea4affce59310a15c6df86c89d1095.tar.gz
portage-6da3070ceeea4affce59310a15c6df86c89d1095.tar.bz2
portage-6da3070ceeea4affce59310a15c6df86c89d1095.zip
Replace implicit doc compression with dir compression in old EAPIs
Unify the documentation compression methods in all EAPIs to compress per-directory rather than implicitly compress files installed by dodoc, doinfo and doman. Old EAPIs don't provide docompress to control which directories are compressed but they don't say anything about dodoc etc. compressing anything either. Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-xbin/ebuild-helpers/dodoc3
-rwxr-xr-xbin/ebuild-helpers/prepinfo3
-rwxr-xr-xbin/ebuild-helpers/prepman35
-rwxr-xr-xbin/misc-functions.sh8
4 files changed, 5 insertions, 44 deletions
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 84936e400..e83091045 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -28,7 +28,6 @@ for x in "$@" ; do
eqawarn "QA Notice: dodoc argument '${x}' is a directory"
elif [ -s "${x}" ] ; then
install -m0644 "${x}" "${dir}" || { ((ret|=1)); continue; }
- ecompress --queue "${dir}/${x##*/}"
elif [ ! -e "${x}" ] ; then
echo "!!! ${0##*/}: $x does not exist" 1>&2
((ret|=1))
diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index eb1b6a7e3..9d33e6e9a 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -34,5 +34,4 @@ find "${ED%/}/${infodir#/}" -type d -print0 | while read -r -d $'\0' x ; do
rm -f "${x}"/dir{,.info}{,.gz,.bz2}
done
-___eapi_has_docompress && exit 0
-exec ecompressdir --queue "${infodir}"
+exit 0
diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 5e9fe45b6..4c6d47bb2 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -2,38 +2,7 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# Do not compress man pages which are smaller than this (in bytes). #169260
-SIZE_LIMIT='128'
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-if ! ___eapi_has_prefix_variables; then
- ED=${D}
-fi
-
-if [[ -z $1 ]] ; then
- mandir="${ED%/}/usr/share/man"
-else
- mandir="${ED%/}/${1#/}/man"
-fi
-
-if [[ ! -d ${mandir} ]] ; then
- eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${ED%/}}'"
- exit 0
-fi
-
-# replaced by controllable compression in EAPI 4
-___eapi_has_docompress && exit 0
-
-shopt -s nullglob
-
-really_is_mandir=0
-
-# use some heuristics to test if this is a real mandir
-for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
- [[ -d ${subdir} ]] && really_is_mandir=1 && break
-done
-
-[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --limit ${SIZE_LIMIT} --queue "${mandir#${ED%/}}"
+# Note: this really does nothing these days. It's going to be banned
+# when the last consumers are gone.
exit 0
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index d25bc8498..ed66e90ca 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -171,12 +171,6 @@ __prepall() {
chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
fi
- if ! ___eapi_has_docompress; then
- while IFS= read -r -d '' mandir ; do
- mandir=${mandir#${ED}}
- prepman "${mandir%/man}"
- done < <(find "${ED}" -type d -name man -print0)
- fi
[[ -d ${ED%/}/usr/share/info ]] && prepinfo
___eapi_has_dostrip || prepallstrip
@@ -245,7 +239,7 @@ install_qa_check() {
export STRIP_MASK
__prepall
- ___eapi_has_docompress && prepcompress
+ prepcompress
ecompressdir --dequeue
ecompress --dequeue