diff options
author | Vlastimil Babka <caster@gentoo.org> | 2007-01-30 14:12:34 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2007-01-30 14:12:34 +0000 |
commit | d28b284eafae8bee48d47cff8c0c56fca921224f (patch) | |
tree | 84d56c8c63ede2d72cb514a455606440a94e64d6 /eclass | |
parent | Added ~x86-fbsd keyword. (diff) | |
download | gentoo-2-d28b284eafae8bee48d47cff8c0c56fca921224f.tar.gz gentoo-2-d28b284eafae8bee48d47cff8c0c56fca921224f.tar.bz2 gentoo-2-d28b284eafae8bee48d47cff8c0c56fca921224f.zip |
Improve output and comments for java-pkg_verify-classes().
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-utils-2.eclass | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 2bb6a17ba348..e089580ddc85 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,7 +6,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.55 2007/01/30 12:50:25 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.56 2007/01/30 14:12:34 caster Exp $ # ----------------------------------------------------------------------------- @@ -2214,24 +2214,33 @@ java-pkg_jar-list() { fi } -# TODO document -# Verify that the classes were compiled for the right source / target -# If $1 is present will check that file otherwise the ${D} directory -# recursively. +# ------------------------------------------------------------------------------ +# @internal-function java-pkg_verify-classes +# +# Verify that the classes were compiled for the right source / target. Dies if +# not. +# @param $1 (optional) - the file to check, otherwise checks whole ${D} +# ------------------------------------------------------------------------------ java-pkg_verify-classes() { #$(find ${D} -type f -name '*.jar' -o -name '*.class') local target=$(java-pkg_get-target) - ebegin "Verifying java class versions (target: ${target})" + local result + local log="${T}/class-version-verify.log" if [[ -n "${1}" ]]; then - class-version-verify.py -t ${target} "${1}" + class-version-verify.py -v -t ${target} "${1}" > "${log}" + result=$? else - class-version-verify.py -t ${target} -r "${D}" + ebegin "Verifying java class versions (target: ${target})" + class-version-verify.py -v -t ${target} -r "${D}" > "${log}" + result=$? + eend ${result} fi - result=$? - eend ${result} + [[ -n ${JAVA_PKG_DEBUG} ]] && cat "${log}" if [[ ${result} != 0 ]]; then - ewarn "Possible problem" - die "Bad class files found" + eerror "Incorrect bytecode version found" + [[ -n "${1}" ]] && eerror "in file: ${1}" + eerror "See ${log} for more details." + die "Incorrect bytecode found" fi } |