diff options
author | Vlastimil Babka <caster@gentoo.org> | 2008-01-12 15:08:47 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2008-01-12 15:08:47 +0000 |
commit | 99792777d12cdfccbb538bc1d91a18ff18ea10aa (patch) | |
tree | fa01fa7f7fa2d6c70bd4801ccefefa2d50b854de | |
parent | Fix function name in die message in java-pkg_getjar(). (diff) | |
download | historical-99792777d12cdfccbb538bc1d91a18ff18ea10aa.tar.gz historical-99792777d12cdfccbb538bc1d91a18ff18ea10aa.tar.bz2 historical-99792777d12cdfccbb538bc1d91a18ff18ea10aa.zip |
Make ANT_TASKS="none" the new default, bug #203750.
-rw-r--r-- | eclass/java-ant-2.eclass | 18 | ||||
-rw-r--r-- | eclass/java-utils-2.eclass | 77 |
2 files changed, 18 insertions, 77 deletions
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index a6e97f777117..b4b845eddec5 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -14,7 +14,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.24 2007/12/18 00:23:06 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.25 2008/01/12 15:08:47 caster Exp $ inherit java-utils-2 @@ -30,16 +30,6 @@ inherit java-utils-2 #WANT_ANT_TASKS # ----------------------------------------------------------------------------- -# @variable-preinherit WANT_SPLIT_ANT -# @variable-default "" -# -# If set, ant-core dependency specifies version with startup script that -# honours ANT_TASKS variable, i.e. >=1.7.0. Using WANT_ANT_TASKS implies -# split-ant already, so you need this only if you manually depend on some -# external package providing ant tasks and want to use it via ANT_TASKS. -[[ -n "${WANT_ANT_TASKS}" ]] && WANT_SPLIT_ANT="true" - -# ----------------------------------------------------------------------------- # @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP # @variable-default unset for java-pkg-2, true for java-pkg-opt-2 # @@ -48,13 +38,9 @@ inherit java-utils-2 # construct ant-speficic DEPEND JAVA_ANT_E_DEPEND="" -# add ant-core into DEPEND, unless disabled; respect WANT_SPLIT_ANT +# add ant-core into DEPEND, unless disabled if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then - if [[ -n "${WANT_SPLIT_ANT}" ]]; then JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0" - else - JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} dev-java/ant-core" - fi fi # add ant tasks specified in WANT_ANT_TASKS to DEPEND diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 985fb6aedd8b..a8652ae96516 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.102 2008/01/12 15:04:26 caster Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.103 2008/01/12 15:08:47 caster Exp $ # ----------------------------------------------------------------------------- # @eclass-begin @@ -1724,41 +1724,6 @@ java-pkg_register-ant-task() { } # ------------------------------------------------------------------------------ -# @internal-function java-pkg_ant-tasks-from-deps -# -# Function to determine ANT_TASKS from DEPEND variable for backwards -# compatibility with ebuilds that don't set ANT_TASKS before calling eant() or -# WANT_ANT_TASKS before inheriting java-pkg-2. If the DEPEND string contains -# "dev-java/ant" or "dev-java/ant-tasks", then it returns "all", otherwise -# "none". It's not smart enough to cope with USE flag depends but that shouldn't -# be a problem, the worst it can do is activace all tasks when not needed. -# Note that this is called only with JAVA_PKG_STRICT=1, to find ebuilds with -# insufficient dependencies, otherwise all available tasks are used for -# backwards compatilbility. -# -# @return "all" or "none" -# ------------------------------------------------------------------------------ -java-pkg_ant-tasks-from-deps() { - local found_ant found_ant_tasks - - for dep in ${DEPEND} - do - local ant="$(awk '/(dev-java\/ant)/ { if (match($1, "(dev-java/ant)((-[0-9])+|$)", m)) print m[1] }' <<< ${dep})" - [[ "${ant}" == "dev-java/ant" ]] && found_ant=true - [[ "${dep}" == *"ant-tasks"* ]] && found_ant_tasks=true - done - - if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then - 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 - # so we deactivate all tasks that may be installed - echo "none" - fi -} - -# ------------------------------------------------------------------------------ # @internal-function java-pkg_ant-tasks-depend # # Translates the WANT_ANT_TASKS variable into valid dependencies. @@ -1913,36 +1878,26 @@ eant() { fi done - # we use this in src_* so we run ant from / - if ROOT=/ has_version ">=dev-java/ant-core-1.7.0"; then - # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly - ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}" - - # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set - ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}" + # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly + ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}" - if is-java-strict; then - # if ant-tasks were not set by ebuild or forced, try to determine them from depends - if [[ -z "${ANT_TASKS}" ]]; then - ANT_TASKS="$(java-pkg_ant-tasks-from-deps)" - fi - else - # if ant-tasks is not set by ebuild or forced, activate all of them - ANT_TASKS="${ANT_TASKS:-all}" - fi + # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set + ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}" - # at this point, ANT_TASKS should be "all", "none" or explicit list - if [[ "${ANT_TASKS}" == "all" ]]; then - einfo "Using all available ANT_TASKS" - elif [[ "${ANT_TASKS}" == "none" ]]; then - einfo "Disabling all optional ANT_TASKS" - else - einfo "Using following ANT_TASKS: ${ANT_TASKS}" - fi + # if ant-tasks is not set by ebuild or forced, use none + ANT_TASKS="${ANT_TASKS:-none}" - export ANT_TASKS + # at this point, ANT_TASKS should be "all", "none" or explicit list + if [[ "${ANT_TASKS}" == "all" ]]; then + einfo "Using all available ANT_TASKS" + elif [[ "${ANT_TASKS}" == "none" ]]; then + einfo "Disabling all optional ANT_TASKS" + else + einfo "Using following ANT_TASKS: ${ANT_TASKS}" fi + export ANT_TASKS + [[ -n ${JAVA_PKG_DEBUG} ]] && antflags="${antflags} --execdebug -debug" [[ -n ${PORTAGE_QUIET} ]] && antflags="${antflags} -q" |