1 |
commit: 711327860c93283aa4d7708b11ff625644c3dd08 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 22 21:14:51 2018 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 24 21:49:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71132786 |
7 |
|
8 |
java-ant-2.eclass: Drop unused and banned java-ant_remove-taskdefs |
9 |
|
10 |
It's been on the scrapheap long enough now. |
11 |
|
12 |
eclass/java-ant-2.eclass | 36 +----------------------------------- |
13 |
1 file changed, 1 insertion(+), 35 deletions(-) |
14 |
|
15 |
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass |
16 |
index db8404a3c24..8da5971844a 100644 |
17 |
--- a/eclass/java-ant-2.eclass |
18 |
+++ b/eclass/java-ant-2.eclass |
19 |
@@ -1,4 +1,4 @@ |
20 |
-# Copyright 2004-2017 Gentoo Foundation |
21 |
+# Copyright 2004-2018 Gentoo Foundation |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
# @ECLASS: java-ant-2.eclass |
25 |
@@ -359,40 +359,6 @@ java-ant_rewrite-classpath() { |
26 |
fi |
27 |
} |
28 |
|
29 |
-# @FUNCTION: java-ant_remove-taskdefs |
30 |
-# @USAGE: [--name NAME] [path/to/build.xml] |
31 |
-# @DESCRIPTION: |
32 |
-# Removes (named) taskdef elements from the build.xml file. |
33 |
-# When --name NAME is specified, only remove taskdef with name NAME. Otherwise, |
34 |
-# all taskdefs are removed. |
35 |
-# The file to rewrite defaults to build.xml when not specified. |
36 |
-java-ant_remove-taskdefs() { |
37 |
- debug-print-function ${FUNCNAME} $* |
38 |
- |
39 |
- die "${FUNCNAME} has been banned, see bug #479838." |
40 |
- |
41 |
- local task_name |
42 |
- if [[ "${1}" == --name ]]; then |
43 |
- task_name="${2}" |
44 |
- shift 2 |
45 |
- fi |
46 |
- local file="${1:-build.xml}" |
47 |
- echo "Removing taskdefs from ${file}" |
48 |
- python <<EOF |
49 |
-import sys |
50 |
-from xml.dom.minidom import parse |
51 |
-dom = parse("${file}") |
52 |
-for elem in dom.getElementsByTagName('taskdef'): |
53 |
- if (len("${task_name}") == 0 or elem.getAttribute("name") == "${task_name}"): |
54 |
- elem.parentNode.removeChild(elem) |
55 |
- elem.unlink() |
56 |
-f = open("${file}", "w") |
57 |
-dom.writexml(f) |
58 |
-f.close() |
59 |
-EOF |
60 |
- [[ $? != 0 ]] && die "Removing taskdefs failed" |
61 |
-} |
62 |
- |
63 |
# @FUNCTION: java-ant_ignore-system-classes |
64 |
# @USAGE: [path/to/build.xml] |
65 |
# @DESCRIPTION: |