Remove arch-specific patch as ant is noarch now

This commit is contained in:
Mikolaj Izdebski 2013-07-02 06:20:32 +02:00
parent 65902ad072
commit 96151060ab
2 changed files with 4 additions and 106 deletions

View File

@ -49,7 +49,7 @@
Name: ant
Version: 1.9.1
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 0
Summary: Build tool for java
Summary(it): Tool per la compilazione di programmi java
@ -61,7 +61,6 @@ Source0: http://www.apache.org/dist/ant/source/apache-ant-%{version}-src.
Source2: apache-ant-%{major_version}.ant.conf
# Fix some places where copies of classes are included in the wrong jarfiles
Patch1: apache-ant-bz163689.patch
Patch3: apache-ant-no-test-jar.patch
Patch4: apache-ant-class-path-in-manifest.patch
@ -391,10 +390,6 @@ Javadoc pour %{name}.
%setup -q -n apache-ant-%{version}
#Fixup version
find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
# Disable the style and xmlvalidate tasks on ppc64 and s390x (#163689).
%ifarch ppc64 s390x
%patch1 -p1
%endif
# When bootstrapping, we don't have junit
%patch3
@ -711,6 +706,9 @@ find $RPM_BUILD_ROOT%{_datadir}/ant/etc -type f -name "*.xsl" \
# -----------------------------------------------------------------------------
%changelog
* Tue Jul 2 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.9.1-3
- Remove arch-specific patch as ant is noarch now
* Mon Jun 03 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.9.1-2
- Enable unit tests

View File

@ -1,100 +0,0 @@
--- apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java.orig 2008-06-27 01:05:16.000000000 -0400
+++ apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java 2008-07-10 16:41:47.456449617 -0400
@@ -166,44 +166,12 @@
* @throws Exception on error
*/
public void transform(File infile, File outfile) throws Exception {
- if (transformer == null) {
- createTransformer();
- }
-
- InputStream fis = null;
- OutputStream fos = null;
- try {
- fis = new BufferedInputStream(new FileInputStream(infile));
- fos = new BufferedOutputStream(new FileOutputStream(outfile));
- StreamResult res = new StreamResult(fos);
- // not sure what could be the need of this...
- res.setSystemId(JAXPUtils.getSystemId(outfile));
- Source src = getSource(fis, infile);
-
- // set parameters on each transformation, maybe something has changed
- //(e.g. value of file name parameter)
- setTransformationParameters();
-
- transformer.transform(src, res);
- } finally {
- // make sure to close all handles, otherwise the garbage
- // collector will close them...whenever possible and
- // Windows may complain about not being able to delete files.
- try {
- if (fis != null) {
- fis.close();
- }
- } catch (IOException ignored) {
- // ignore
- }
- try {
- if (fos != null) {
- fos.close();
- }
- } catch (IOException ignored) {
- // ignore
- }
- }
+ if (logger != null) {
+ logger.log("The style task is disabled on this platform");
+ logger.log(
+ "http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163689");
+ }
+ new FileOutputStream(outfile).close();
}
/**
--- apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java.orig 2008-06-27 01:05:22.000000000 -0400
+++ apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java 2008-07-10 16:42:09.270573847 -0400
@@ -285,42 +285,8 @@
* @throws BuildException if <code>failonerror</code> is true and an error happens
*/
public void execute() throws BuildException {
-
- int fileProcessed = 0;
- if (file == null && (filesets.size() == 0)) {
- throw new BuildException(
- "Specify at least one source - " + "a file or a fileset.");
- }
-
-
-
- if (file != null) {
- if (file.exists() && file.canRead() && file.isFile()) {
- doValidate(file);
- fileProcessed++;
- } else {
- String errorMsg = "File " + file + " cannot be read";
- if (failOnError) {
- throw new BuildException(errorMsg);
- } else {
- log(errorMsg, Project.MSG_ERR);
- }
- }
- }
-
- for (int i = 0; i < filesets.size(); i++) {
-
- FileSet fs = (FileSet) filesets.elementAt(i);
- DirectoryScanner ds = fs.getDirectoryScanner(getProject());
- String[] files = ds.getIncludedFiles();
-
- for (int j = 0; j < files.length; j++) {
- File srcFile = new File(fs.getDir(getProject()), files[j]);
- doValidate(srcFile);
- fileProcessed++;
- }
- }
- onSuccessfulValidation(fileProcessed);
+ log("The xmlvalidate task is disabled on this platform");
+ log("http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163689");
}
/**