summaryrefslogtreecommitdiffstats
path: root/bin/prepman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-04-12 04:14:46 +0000
committerZac Medico <zmedico@gentoo.org>2007-04-12 04:14:46 +0000
commit4e4608de2b5e53bc2abdc2aa1aba5656773ea9d9 (patch)
treeecbc57f91451ceda4f9751810d9ca4730ab58f27 /bin/prepman
parent5ddd4810995ce058c9081e80d431a634720cef5c (diff)
downloadportage-4e4608de2b5e53bc2abdc2aa1aba5656773ea9d9.tar.gz
portage-4e4608de2b5e53bc2abdc2aa1aba5656773ea9d9.tar.bz2
portage-4e4608de2b5e53bc2abdc2aa1aba5656773ea9d9.zip
For bug #173808, add back the old heuristics to make sure that we don't just blindly compress the contents of any directory named "man".
svn path=/main/branches/2.1.2/; revision=6372
Diffstat (limited to 'bin/prepman')
-rwxr-xr-xbin/prepman13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/prepman b/bin/prepman
index c17faa1b8..c2a245f40 100755
--- a/bin/prepman
+++ b/bin/prepman
@@ -16,4 +16,15 @@ if [[ ! -d ${mandir} ]] ; then
exit 0
fi
-exec ecompressdir "${mandir#${D}}"
+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 "${mandir#${D}}"
+
+exit 0