diff --git a/WHATSNEW b/WHATSNEW index ff2585def..4ea2316d3 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -317,7 +317,7 @@ Other changes: used to document packages that don't hold source files but a package.html file. Bugzilla Report 25339. -* has new attributes failonerror and showoutput attributes. +* has new attributes failonerror and quiet. * Added two tutorials - beginner: introduction into Ant diff --git a/docs/manual/OptionalTasks/rpm.html b/docs/manual/OptionalTasks/rpm.html index 1dbafc5bf..e046001a2 100644 --- a/docs/manual/OptionalTasks/rpm.html +++ b/docs/manual/OptionalTasks/rpm.html @@ -31,7 +31,7 @@ topDir - this is the directory which will have the expected + This is the directory which will have the expected subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified, the baseDir value is used @@ -45,12 +45,12 @@ directory. removeSpec - this will remove the spec file from SPECS + This will remove the spec file from SPECS No removeSource - Flag (optional, default=false) + Flag (optional, default=false) to remove the sources after the build. See the the --rmsource option of rpmbuild. No @@ -66,12 +66,23 @@ directory. command - very similar idea to the cvs task. the default is "-bb" + Very similar idea to the cvs task. the default is "-bb" + No + + + quiet + Suppress output. Defaults to false. No output/error - where standard output and error go + Where standard output and error go + No + + + failOnError + Stop the buildprocess if the RPM build command exits with + a non-zero retuncode. Defaults to false No diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java index 2c5d22e2c..ada1e940b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java @@ -95,10 +95,10 @@ public class Rpm extends Task { private boolean failOnError = false; /** - * Show output of RPM build command on console. This does not affect + * Don't show output of RPM build command on console. This does not affect * the printing of output and error messages to files. */ - private boolean showoutput = true; + private boolean quiet = false; /** * Execute the task @@ -135,7 +135,7 @@ public class Rpm extends Task { OutputStream outputstream = null; OutputStream errorstream = null; if (error == null && output == null) { - if (showoutput) { + if (!quiet) { streamhandler = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); } else { @@ -151,7 +151,7 @@ public class Rpm extends Task { } catch (IOException e) { throw new BuildException(e, getLocation()); } - } else if (showoutput) { + } else if (!quiet) { outputstream = new LogOutputStream(this, Project.MSG_INFO); } else { outputstream = new LogOutputStream(this, Project.MSG_DEBUG); @@ -164,7 +164,7 @@ public class Rpm extends Task { } catch (IOException e) { throw new BuildException(e, getLocation()); } - } else if (showoutput) { + } else if (!quiet) { errorstream = new LogOutputStream(this, Project.MSG_WARN); } else { errorstream = new LogOutputStream(this, Project.MSG_DEBUG); @@ -273,10 +273,10 @@ public class Rpm extends Task { } /** - * If true, stop the build process when the rpmbuild command exits with - * an error status. - * @param value true if it should halt, otherwise - * false + * If true, stop the build process when the rpmbuild command + * exits with an error status. + * @param value true if it should halt, otherwise + * false. The default is false. * * @since Ant 1.6.3 */ @@ -285,14 +285,14 @@ public class Rpm extends Task { } /** - * If false, no output from the RPM build command will be logged. - * @param value true if output should be logged, otherwise - * false + * If true, output from the RPM build command will only be logged to DEBUG. + * @param value false if output should be logged, otherwise + * true. The default is false. * * @since Ant 1.6.3 */ - public void setShowoutput(boolean value) { - showoutput = value; + public void setQuiet(boolean value) { + quiet = value; } /** @@ -330,7 +330,7 @@ public class Rpm extends Task { } /** - * @since Ant 1.7 + * @since Ant 1.6.3 */ protected Execute getExecute(Commandline toExecute, ExecuteStreamHandler streamhandler) {