summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers
diff options
context:
space:
mode:
authorUlrich Mueller <ulm@gentoo.org>2010-08-28 09:20:23 +0200
committerZac Medico <zmedico@gentoo.org>2010-08-28 16:12:11 -0700
commit59ea804b01cd711d4235e46e4cc4fdef8390d5fe (patch)
tree397852ab56ee19e7031b874cd335bf5a4bb02b46 /bin/ebuild-helpers
parent87b1b094b789f414da007214bbd3f651671f084f (diff)
downloadportage-59ea804b01cd711d4235e46e4cc4fdef8390d5fe.tar.gz
portage-59ea804b01cd711d4235e46e4cc4fdef8390d5fe.tar.bz2
portage-59ea804b01cd711d4235e46e4cc4fdef8390d5fe.zip
Implement controllable compression and docompress, bug #273633.
Diffstat (limited to 'bin/ebuild-helpers')
-rwxr-xr-xbin/ebuild-helpers/dodoc2
-rwxr-xr-xbin/ebuild-helpers/ecompressdir5
-rwxr-xr-xbin/ebuild-helpers/prepalldocs5
-rwxr-xr-xbin/ebuild-helpers/prepallman3
-rwxr-xr-xbin/ebuild-helpers/prepinfo1
-rwxr-xr-xbin/ebuild-helpers/prepman3
6 files changed, 16 insertions, 3 deletions
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 29b690112..99410ea85 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -18,7 +18,7 @@ ret=0
for x in "$@" ; do
if [ -s "${x}" ] ; then
install -m0644 "${x}" "${dir}"
- ecompress --queue "${dir}/${x##*/}"
+ hasq "${EAPI}" 0 1 2 3 && ecompress --queue "${dir}/${x##*/}"
elif [ ! -e "${x}" ] ; then
echo "!!! ${0##*/}: $x does not exist" 1>&2
((ret|=1))
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 90c26f9d5..acdb1cd7f 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -13,7 +13,8 @@ case $1 in
--ignore)
shift
for skip in "$@" ; do
- [[ -d ${D}${skip} ]] && touch "${D}${skip}.ecompress.skip"
+ [[ -d ${D}${skip} || -f ${D}${skip} ]] \
+ && touch "${D}${skip}.ecompress.skip"
done
exit 0
;;
@@ -74,7 +75,7 @@ funk_up_dir() {
}
# _relocate_skip_dirs(srctree, dsttree)
-# Move all the directories we want to skip running compression
+# Move all files and directories we want to skip running compression
# on from srctree to dsttree.
_relocate_skip_dirs() {
local srctree="$1" dsttree="$2"
diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
index 6705f5e79..f7026c679 100755
--- a/bin/ebuild-helpers/prepalldocs
+++ b/bin/ebuild-helpers/prepalldocs
@@ -4,6 +4,11 @@
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+if ! hasq "${EAPI}" 0 1 2 3; then
+ eqawarn "QA Notice: Deprecated call to 'prepalldocs'"
+ exit 0
+fi
+
if [[ -n $1 ]] ; then
vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
fi
diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index f41bcb816..71b79a0ef 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -4,6 +4,9 @@
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+# replaced by controllable compression in EAPI 4
+hasq "${EAPI}" 0 1 2 3 || exit 0
+
ret=0
find "${D}" -type d -name man > "${T}"/prepallman.filelist
diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 1d8c7d1f0..cb39ab86c 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -27,4 +27,5 @@ find "${D}${infodir}" -type d -print0 | while read -d $'\0' x ; do
rm -f "${x}"/dir{,.info}{,.gz,.bz2}
done
+hasq "${EAPI}" 0 1 2 3 || exit 0
exec ecompressdir --queue "${infodir}"
diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index cfbcdd41a..97f2fbf7e 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -15,6 +15,9 @@ if [[ ! -d ${mandir} ]] ; then
exit 0
fi
+# replaced by controllable compression in EAPI 4
+hasq "${EAPI}" 0 1 2 3 || exit 0
+
shopt -s nullglob
really_is_mandir=0