summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2007-04-29 13:13:03 +0000
committerVlastimil Babka <caster@gentoo.org>2007-04-29 13:13:03 +0000
commit2b77aa5e8b748a7a65ba4c05f02e27842ad1a2e9 (patch)
tree55477c4b548ca51b211bf41c01eec97a4ba9ffd3 /eclass/java-utils-2.eclass
parentRDEPEND on dev-java/ant-core and call java-pkg-2_pkg_setup in pkg_setup. (diff)
downloadgentoo-2-2b77aa5e8b748a7a65ba4c05f02e27842ad1a2e9.tar.gz
gentoo-2-2b77aa5e8b748a7a65ba4c05f02e27842ad1a2e9.tar.bz2
gentoo-2-2b77aa5e8b748a7a65ba4c05f02e27842ad1a2e9.zip
Automatically determine funcname in check-phase(); make announce-qa-violation output QA notices even without java-strict, and die with java-strict, unless called with --nodie; update all calls to the function to reflect this.
Diffstat (limited to 'eclass/java-utils-2.eclass')
-rw-r--r--eclass/java-utils-2.eclass33
1 files changed, 15 insertions, 18 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 5859202a85f8..ff04af9bf2b1 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.81 2007/04/27 10:14:15 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.82 2007/04/29 13:13:03 caster Exp $
# -----------------------------------------------------------------------------
@@ -1618,7 +1618,7 @@ java-pkg_ant-tasks-from-deps() {
done
if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then
- java-pkg_announce-qa-violation "The ebuild DEPENDS on deprecated ant or ant-tasks"
+ java-pkg_announce-qa-violation --nodie "The ebuild DEPENDS on deprecated ant or ant-tasks"
echo "all"
else
# ebuild doesn't set ANT_TASKS and doesn't depend on ant-tasks or ant
@@ -1678,16 +1678,9 @@ java-pkg_ant-tasks-depend() {
eant() {
debug-print-function ${FUNCNAME} $*
- # FIXME get this working
-# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then
-# java-pkg_announce-qa-violation \
-# "Using eant, but not depending on dev-java/ant or dev-java/ant-core"
-# fi
-
- if ! hasq java-ant-2 ${INHERITED} && is-java-strict; then
+ if ! hasq java-ant-2 ${INHERITED}; then
local msg="You should inherit java-ant-2 when using eant"
- java-pkg_announce-qa-violation ${msg}
- die ${msg}
+ java-pkg_announce-qa-violation "${msg}"
fi
local antflags="-Dnoget=true -Dmaven.mode.offline=true"
@@ -2461,10 +2454,10 @@ java-pkg_ensure-dep() {
java-pkg_check-phase() {
local phase=${1}
- local funcname=${2}
- if is-java-strict && [[ ${EBUILD_PHASE} != ${phase} ]]; then
- java-pkg_announce-qa-violation \
- "${funcname} used outside of src_${phase}"
+ local funcname=${FUNCNAME[1]}
+ if [[ ${EBUILD_PHASE} != ${phase} ]]; then
+ local msg="${funcname} used outside of src_${phase}"
+ java-pkg_announce-qa-violation "${msg}"
fi
}
@@ -2483,10 +2476,14 @@ java-pkg_check-jikes() {
}
java-pkg_announce-qa-violation() {
- if is-java-strict; then
- echo "Java QA Notice: $@" >&2
- increment-qa-violations
+ local nodie
+ if [[ ${1} == "--nodie" ]]; then
+ nodie="true"
+ shift
fi
+ echo "Java QA Notice: $@" >&2
+ increment-qa-violations
+ [[ -z "${nodie}" ]] && is-java-strict && die "${@}"
}
increment-qa-violations() {