diff options
author | 2013-09-14 19:00:10 +0000 | |
---|---|---|
committer | 2013-09-14 19:00:10 +0000 | |
commit | f6fc6e031a346f9cfbfbaeddf1a30354cd8a16b8 (patch) | |
tree | af67b8db0a7af5217633f578ee00160150712434 /eclass | |
parent | Replace --without-python with --disable-python-devel for non-native abis, bug... (diff) | |
download | gentoo-2-f6fc6e031a346f9cfbfbaeddf1a30354cd8a16b8.tar.gz gentoo-2-f6fc6e031a346f9cfbfbaeddf1a30354cd8a16b8.tar.bz2 gentoo-2-f6fc6e031a346f9cfbfbaeddf1a30354cd8a16b8.zip |
Support EAPIs < 4 in einstalldocs properly.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/eutils.eclass | 25 |
2 files changed, 23 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 9bc61b65a471..9890b5b5b0d4 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.963 2013/09/13 15:08:37 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.964 2013/09/14 19:00:10 mgorny Exp $ + + 14 Sep 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass: + Support EAPIs < 4 in einstalldocs properly. 13 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass: Fail early on unreachable URLs. If ls-remote fails due to server being diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 7798f54691e7..d1acc732168e 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.426 2013/09/13 11:22:52 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.427 2013/09/14 19:00:10 mgorny Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -1648,22 +1648,35 @@ prune_libtool_files() { einstalldocs() { debug-print-function ${FUNCNAME} "${@}" + local dodoc_opts=-r + has ${EAPI} 0 1 2 3 && dodoc_opts= + if ! declare -p DOCS &>/dev/null ; then local d for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do - [[ -s ${d} ]] && dodoc "${d}" + if [[ -s ${d} ]] ; then + dodoc "${d}" || die + fi done elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then - [[ ${DOCS[@]} ]] && dodoc -r "${DOCS[@]}" + if [[ ${DOCS[@]} ]] ; then + dodoc ${dodoc_opts} "${DOCS[@]}" || die + fi else - [[ ${DOCS} ]] && dodoc -r ${DOCS} + if [[ ${DOCS} ]] ; then + dodoc ${dodoc_opts} ${DOCS} || die + fi fi if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then - [[ ${HTML_DOCS[@]} ]] && dohtml -r "${HTML_DOCS[@]}" + if [[ ${HTML_DOCS[@]} ]] ; then + dohtml -r "${HTML_DOCS[@]}" || die + fi else - [[ ${HTML_DOCS} ]] && dohtml -r ${HTML_DOCS} + if [[ ${HTML_DOCS} ]] ; then + dohtml -r ${HTML_DOCS} || die + fi fi return 0 |