From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Pt3ia-0004Yi-DZ for garchives@archives.gentoo.org; Fri, 25 Feb 2011 19:52:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2404E05F1; Fri, 25 Feb 2011 19:52:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AC625E05F1 for ; Fri, 25 Feb 2011 19:52:38 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03B6C1B4024 for ; Fri, 25 Feb 2011 19:52:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 662D68006A for ; Fri, 25 Feb 2011 19:52:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <23694b1dd9c6400da68ea2029e9f190994a631ac.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/, bin/ebuild-helpers/4/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild-helpers/4/dodoc bin/ebuild-helpers/doins X-VCS-Directories: bin/ebuild-helpers/ bin/ebuild-helpers/4/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 23694b1dd9c6400da68ea2029e9f190994a631ac Date: Fri, 25 Feb 2011 19:52:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 11efc0831bbae3d73e75339ec369d86f commit: 23694b1dd9c6400da68ea2029e9f190994a631ac Author: Zac Medico gentoo org> AuthorDate: Fri Feb 25 19:50:52 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Feb 25 19:50:52 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D23694b1d dodoc: call doins, to reuse recursion code This will fix broken recursion logic for bug #356461. --- bin/ebuild-helpers/4/dodoc | 51 +-------------------------------------= ------ bin/ebuild-helpers/doins | 13 ++++++++++- 2 files changed, 13 insertions(+), 51 deletions(-) diff --git a/bin/ebuild-helpers/4/dodoc b/bin/ebuild-helpers/4/dodoc deleted file mode 100755 index 617bae2..0000000 --- a/bin/ebuild-helpers/4/dodoc +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh - -if [ $# -lt 1 ] ; then - die "${0##*/}: at least one argument needed" - exit 1 -fi - -dir=3D"${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" -if [ ! -d "${dir}" ] ; then - install -d "${dir}" -fi - -ret=3D0 - -DOINSRECUR=3D"n" - -if [[ "$1" =3D=3D "-r" ]] ; then - DOINSRECUR=3D"y" - shift -fi - -for x in "$@" ; do - - if [ -d "${x}" ] ; then - if [[ ${DOINSRECUR} =3D=3D "n" ]] ; then - echo "!!! ${0##*/}: $x is a directory" 1>&2 - ((ret|=3D1)) - continue - fi - - find "${x}" -mindepth 1 -maxdepth 1 -exec \ - env \ - _E_DOCDESTTREE_=3D"$(basename "${x}")" \ - "${0}" -r {} \; - - elif [ -s "${x}" ] ; then - install -m0644 "${x}" "${dir}" || ((ret|=3D1)) - elif [ ! -e "${x}" ] ; then - echo "!!! ${0##*/}: $x does not exist" 1>&2 - ((ret|=3D1)) - fi - -done - -[[ $ret -ne 0 ]] && die "${0##*/} failed" -exit ${ret} diff --git a/bin/ebuild-helpers/4/dodoc b/bin/ebuild-helpers/4/dodoc new file mode 120000 index 0000000..35080ad --- /dev/null +++ b/bin/ebuild-helpers/4/dodoc @@ -0,0 +1 @@ +../doins \ No newline at end of file diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index 51cac06..8055a37 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -16,6 +16,17 @@ else DOINSRECUR=3Dn fi =20 +if [[ ${0##*/} =3D=3D dodoc ]] ; then + if [ $# -eq 0 ] ; then + # default_src_install may call dodoc with no arguments + # when DOC is defined but empty, so simply return + # sucessfully in this case. + exit 0 + fi + export INSOPTIONS=3D-m0644 + export INSDESTTREE=3Dusr/share/doc/${PF}/${_E_DOCDESTTREE_} +fi + if [[ ${INSDESTTREE#${D}} !=3D "${INSDESTTREE}" ]]; then vecho "-------------------------------------------------------" 1>&2 vecho "You should not use \${D} with helpers." 1>&2