chewi       15/08/02 23:12:16

  Modified:             ChangeLog java-utils-2.eclass
  Log:
  Allow java-pkg_get-javac to be called alone. Fixes bug #172594. Thanks
  to sping for the patch. Also simplify die logic around
  java-pkg_javac-args. die handling has improved since this was written.

Revision  Changes    Path
1.1742               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1742&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1742&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1741&r2=1.1742

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1741
retrieving revision 1.1742
diff -u -r1.1741 -r1.1742
--- ChangeLog   31 Jul 2015 07:56:17 -0000      1.1741
+++ ChangeLog   2 Aug 2015 23:12:16 -0000       1.1742
@@ -1,6 +1,11 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1741 2015/07/31 
07:56:17 monsieurp Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1742 2015/08/02 
23:12:16 chewi Exp $
+
+  02 Aug 2015; James Le Cuirot <[email protected]> java-utils-2.eclass:
+  Allow java-pkg_get-javac to be called alone. Fixes bug #172594. Thanks to
+  sping for the patch. Also simplify die logic around java-pkg_javac-args. die
+  handling has improved since this was written.
 
   31 Jul 2015; Patrice Clement <[email protected]> java-utils-2.eclass:
   Document JAVA_RM_FILES variable. Also, fix documentation and correct typos in



1.169                eclass/java-utils-2.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.169&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.169&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?r1=1.168&r2=1.169

Index: java-utils-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- java-utils-2.eclass 31 Jul 2015 07:56:17 -0000      1.168
+++ java-utils-2.eclass 2 Aug 2015 23:12:16 -0000       1.169
@@ -6,7 +6,7 @@
 #
 # Licensed under the GNU General Public License, v2
 #
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.168 
2015/07/31 07:56:17 monsieurp Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.169 
2015/08/02 23:12:16 chewi Exp $
 
 # @ECLASS: java-utils-2.eclass
 # @MAINTAINER:
@@ -262,14 +262,14 @@
        popd > /dev/null || die "popd failed"
 }
 
-# @FUNCTION: java-pkg_rm_files 
+# @FUNCTION: java-pkg_rm_files
 # @USAGE: java-pkg_rm_files File1.java File2.java ...
 # @DESCRIPTION:
 # Remove unneeded files in ${S}.
 #
 # Every now and then, you'll run into situations whereby a file needs removing,
 # be it a unit test or a regular java class.
-# 
+#
 # You can use this function by either:
 # - calling it yourself in java_prepare() and feeding java-pkg_rm_files with
 # the list of files you wish to remove.
@@ -1583,7 +1583,7 @@
 java-pkg_get-javac() {
        debug-print-function ${FUNCNAME} $*
 
-
+       java-pkg_init-compiler_
        local compiler="${GENTOO_COMPILER}"
 
        local compiler_executable
@@ -1602,18 +1602,15 @@
                        export JAVAC=${old_javac}
 
                        if [[ -z ${compiler_executable} ]]; then
-                               echo "JAVAC is empty or undefined in 
${compiler_env}"
-                               return 1
+                               die "JAVAC is empty or undefined in 
${compiler_env}"
                        fi
 
                        # check that it's executable
                        if [[ ! -x ${compiler_executable} ]]; then
-                               echo "${compiler_executable} doesn't exist, or 
isn't executable"
-                               return 1
+                               die "${compiler_executable} doesn't exist, or 
isn't executable"
                        fi
                else
-                       echo "Could not find environment file for ${compiler}"
-                       return 1
+                       die "Could not find environment file for ${compiler}"
                fi
        fi
        echo ${compiler_executable}
@@ -1638,9 +1635,7 @@
        debug-print "want target: ${want_target}"
 
        if [[ -z "${want_source}" || -z "${want_target}" ]]; then
-               debug-print "could not find valid -source/-target values for 
javac"
-               echo "Could not find valid -source/-target values for javac"
-               return 1
+               die "Could not find valid -source/-target values for javac"
        else
                echo "${source_str} ${target_str}"
        fi
@@ -2006,21 +2001,11 @@
 ejavac() {
        debug-print-function ${FUNCNAME} $*
 
-       java-pkg_init-compiler_
-
        local compiler_executable
        compiler_executable=$(java-pkg_get-javac)
-       if [[ ${?} != 0 ]]; then
-               eerror "There was a problem determining compiler: 
${compiler_executable}"
-               die "get-javac failed"
-       fi
 
        local javac_args
        javac_args="$(java-pkg_javac-args)"
-       if [[ ${?} != 0 ]]; then
-               eerror "There was a problem determining JAVACFLAGS: 
${javac_args}"
-               die "java-pkg_javac-args failed"
-       fi
 
        [[ -n ${JAVA_PKG_DEBUG} ]] && echo ${compiler_executable} ${javac_args} 
"${@}"
        ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
@@ -2626,10 +2611,6 @@
                export JAVA=$(java-config --java)
                export JAVAC=$(java-config --javac)
                JAVACFLAGS="$(java-pkg_javac-args)"
-               if [[ ${?} != 0 ]]; then
-                       eerror "There was a problem determining JAVACFLAGS: 
${JAVACFLAGS}"
-                       die "java-pkg_javac-args failed"
-               fi
                [[ -n ${JAVACFLAGS_EXTRA} ]] && JAVACFLAGS="${JAVACFLAGS_EXTRA} 
${JAVACFLAGS}"
                export JAVACFLAGS
 




Reply via email to