summaryrefslogtreecommitdiff
path: root/eclass/java-ant-2.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-25 19:22:13 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-03-25 19:22:13 +0100
commit6bd95d1f6320b8666a31ec949183aaa3088aa16f (patch)
treeff9f0cde8bfba5191f96c690c269c814c134a51e /eclass/java-ant-2.eclass
parentb279bbe94522565b8feb19b8e5f377d3ea76f157 (diff)
gentoo resync : 25.03.2018
Diffstat (limited to 'eclass/java-ant-2.eclass')
-rw-r--r--eclass/java-ant-2.eclass36
1 files changed, 1 insertions, 35 deletions
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index db8404a3c24b..8da5971844a0 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 2004-2017 Gentoo Foundation
+# Copyright 2004-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: java-ant-2.eclass
@@ -359,40 +359,6 @@ java-ant_rewrite-classpath() {
fi
}
-# @FUNCTION: java-ant_remove-taskdefs
-# @USAGE: [--name NAME] [path/to/build.xml]
-# @DESCRIPTION:
-# Removes (named) taskdef elements from the build.xml file.
-# When --name NAME is specified, only remove taskdef with name NAME. Otherwise,
-# all taskdefs are removed.
-# The file to rewrite defaults to build.xml when not specified.
-java-ant_remove-taskdefs() {
- debug-print-function ${FUNCNAME} $*
-
- die "${FUNCNAME} has been banned, see bug #479838."
-
- local task_name
- if [[ "${1}" == --name ]]; then
- task_name="${2}"
- shift 2
- fi
- local file="${1:-build.xml}"
- echo "Removing taskdefs from ${file}"
- python <<EOF
-import sys
-from xml.dom.minidom import parse
-dom = parse("${file}")
-for elem in dom.getElementsByTagName('taskdef'):
- if (len("${task_name}") == 0 or elem.getAttribute("name") == "${task_name}"):
- elem.parentNode.removeChild(elem)
- elem.unlink()
-f = open("${file}", "w")
-dom.writexml(f)
-f.close()
-EOF
- [[ $? != 0 ]] && die "Removing taskdefs failed"
-}
-
# @FUNCTION: java-ant_ignore-system-classes
# @USAGE: [path/to/build.xml]
# @DESCRIPTION: