Gentoo Archives: gentoo-commits

From: "Petteri Raty (betelgeuse)" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: java-utils-2.eclass
Date: Tue, 31 Mar 2009 19:19:22
Message-Id: E1LojUW-0002Zm-Ro@stork.gentoo.org
1 betelgeuse 09/03/31 19:19:20
2
3 Modified: java-utils-2.eclass
4 Log:
5 Simply java-pkg_func-exists using suggestions by ciaranm and dberkholz on gentoo-dev.
6
7 Revision Changes Path
8 1.126 eclass/java-utils-2.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.126&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.126&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?r1=1.125&r2=1.126
13
14 Index: java-utils-2.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
17 retrieving revision 1.125
18 retrieving revision 1.126
19 diff -u -r1.125 -r1.126
20 --- java-utils-2.eclass 27 Mar 2009 20:58:57 -0000 1.125
21 +++ java-utils-2.eclass 31 Mar 2009 19:19:20 -0000 1.126
22 @@ -6,7 +6,7 @@
23 #
24 # Licensed under the GNU General Public License, v2
25 #
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.125 2009/03/27 20:58:57 betelgeuse Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.126 2009/03/31 19:19:20 betelgeuse Exp $
28
29 # -----------------------------------------------------------------------------
30 # @eclass-begin
31 @@ -367,6 +367,7 @@
32 eerror "has * in it. If you want it to glob in"
33 eerror '${D} add ${D} to the argument.'
34 fi
35 + debug-print "${jar} or ${D}${jar} not found"
36 die "${jar} does not exist"
37 fi
38 done
39 @@ -2449,11 +2450,7 @@
40 # @return 1 - function is undeclared
41 # ------------------------------------------------------------------------------
42 java-pkg_func-exists() {
43 - if [[ -n "$(declare -f ${1})" ]]; then
44 - return 0
45 - else
46 - return 1
47 - fi
48 + declare -F ${1} > /dev/null
49 }
50
51 # ------------------------------------------------------------------------------