summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-10 06:18:13 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-10 06:18:13 +0000
commit507bae0b716b00d3748e1305a194a61641dc7d89 (patch)
tree0001e8cc9afbf26c2846954f70b6b0957413f0c4
parentmake.globals has no business in profiles (diff)
downloadportage-multirepo-507bae0b716b00d3748e1305a194a61641dc7d89.tar.gz
portage-multirepo-507bae0b716b00d3748e1305a194a61641dc7d89.tar.bz2
portage-multirepo-507bae0b716b00d3748e1305a194a61641dc7d89.zip
create symlinks to html documentation if DOC_SYMLINK_DIR is set, original patch by TGL <degrenier@easyconnect.fr> (bug #67130)
svn path=/main/trunk/; revision=5509
-rw-r--r--NEWS1
-rwxr-xr-xbin/misc-functions.sh24
-rw-r--r--pym/portage.py2
3 files changed, 26 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index dedf2827..eee71be5 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ portage-2.1.2
file/mail.
* New QA loglevel and matching eqawarn function
* `ebuild foo test` now always runs src_test if available
+* If DOC_SYMLINK_DIR is set portage installs symlinks to html documention there
portage-2.1.1
------------
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 198538d0..55428862 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -17,6 +17,30 @@ shift $#
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/ebuild.sh"
+install_symlink_html_docs() {
+ cd "${D}" || die "cd failed"
+ #symlink the html documentation (if DOC_SYMLINKS_DIR is set in make.conf)
+ if [ -n "${DOC_SYMLINKS_DIR}" ] ; then
+ local mydocdir docdir
+ for docdir in "${HTMLDOC_DIR:-does/not/exist}" "${PF}/html" "${PF}/HTML" "${P}/html" "${P}/HTML" ; do
+ if [ -d "usr/share/doc/${docdir}" ] ; then
+ mydocdir="/usr/share/doc/${docdir}"
+ fi
+ done
+ if [ -n "${mydocdir}" ] ; then
+ local mysympath
+ if [ -z "${SLOT}" -o "${SLOT}" = "0" ] ; then
+ mysympath="${DOC_SYMLINKS_DIR}/${CATEGORY}/${PN}"
+ else
+ mysympath="${DOC_SYMLINKS_DIR}/${CATEGORY}/${PN}-${SLOT}"
+ fi
+ einfo "Symlinking ${mysympath} to the HTML documentation"
+ dodir "${DOC_SYMLINKS_DIR}/${CATEGORY}"
+ dosym "${mydocdir}" "${mysympath}"
+ fi
+ fi
+}
+
install_qa_check() {
cd "${D}" || die "cd failed"
prepall
diff --git a/pym/portage.py b/pym/portage.py
index 056a4c85..3f3e378a 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2841,7 +2841,7 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
apply_secpass_permissions(fpath, uid=myuid, gid=mygid,
mode=mystat.st_mode, stat_cached=mystat,
follow_links=False)
- mycommand = " ".join([MISC_SH_BINARY, "install_qa_check"])
+ mycommand = " ".join([MISC_SH_BINARY, "install_qa_check", "install_symlink_html_docs"])
qa_retval = spawn(mycommand, mysettings, debug=debug, logfile=logfile, **kwargs)
if qa_retval:
writemsg("!!! install_qa_check failed; exiting.\n",