Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: bin/ebuild-helpers/
Date: Tue, 01 Mar 2011 21:03:53
Message-Id: 9c38ee773137964eb05abbf4f32bc7f5b7352d95.zmedico@gentoo
1 commit: 9c38ee773137964eb05abbf4f32bc7f5b7352d95
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 25 20:11:34 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 1 20:52:05 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9c38ee77
7
8 doins: avoid die when called as dodoc with no arg
9
10 ---
11 bin/ebuild-helpers/doins | 22 +++++++++++-----------
12 1 files changed, 11 insertions(+), 11 deletions(-)
13
14 diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
15 index 8055a37..c549791 100755
16 --- a/bin/ebuild-helpers/doins
17 +++ b/bin/ebuild-helpers/doins
18 @@ -4,6 +4,17 @@
19
20 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
21
22 +if [[ ${0##*/} == dodoc ]] ; then
23 + if [ $# -eq 0 ] ; then
24 + # default_src_install may call dodoc with no arguments
25 + # when DOC is defined but empty, so simply return
26 + # sucessfully in this case.
27 + exit 0
28 + fi
29 + export INSOPTIONS=-m0644
30 + export INSDESTTREE=usr/share/doc/${PF}/${_E_DOCDESTTREE_}
31 +fi
32 +
33 if [ $# -lt 1 ] ; then
34 helpers_die "${0##*/}: at least one argument needed"
35 exit 1
36 @@ -16,17 +27,6 @@ else
37 DOINSRECUR=n
38 fi
39
40 -if [[ ${0##*/} == dodoc ]] ; then
41 - if [ $# -eq 0 ] ; then
42 - # default_src_install may call dodoc with no arguments
43 - # when DOC is defined but empty, so simply return
44 - # sucessfully in this case.
45 - exit 0
46 - fi
47 - export INSOPTIONS=-m0644
48 - export INSDESTTREE=usr/share/doc/${PF}/${_E_DOCDESTTREE_}
49 -fi
50 -
51 if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then
52 vecho "-------------------------------------------------------" 1>&2
53 vecho "You should not use \${D} with helpers." 1>&2