Browse Source

Rename rpm's showoutput attribute to quiet, document it - Submitted by Zach Garner

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278104 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
223b50ebd9
3 changed files with 32 additions and 21 deletions
  1. +1
    -1
      WHATSNEW
  2. +16
    -5
      docs/manual/OptionalTasks/rpm.html
  3. +15
    -15
      src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java

+ 1
- 1
WHATSNEW View File

@@ -317,7 +317,7 @@ Other changes:
used to document packages that don't hold source files but a
package.html file. Bugzilla Report 25339.

* <rpm> has new attributes failonerror and showoutput attributes.
* <rpm> has new attributes failonerror and quiet.

* Added two tutorials
- beginner: introduction into Ant


+ 16
- 5
docs/manual/OptionalTasks/rpm.html View File

@@ -31,7 +31,7 @@
<tr>
<td valign="top">topDir</td>
<td valign="top">
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
</td>
@@ -45,12 +45,12 @@ directory.</td>
</tr>
<tr>
<td valign="top">removeSpec</td>
<td valign="top">this will remove the spec file from SPECS</td>
<td valign="top">This will remove the spec file from SPECS</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">removeSource</td>
<td valign="top"> Flag (optional, default=false)
<td valign="top">Flag (optional, default=false)
to remove the sources after the build.
See the the <tt>--rmsource</tt> option of rpmbuild.</td>
<td align="center" valign="top">No</td>
@@ -66,12 +66,23 @@ directory.</td>
</tr>
<tr>
<td valign="top">command</td>
<td valign="top">very similar idea to the cvs task. the default is "-bb"</td>
<td valign="top">Very similar idea to the cvs task. the default is "-bb"</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">quiet</td>
<td valign="top">Suppress output. Defaults to false.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">output/error</td>
<td valign="top">where standard output and error go</td>
<td valign="top">Where standard output and error go</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">failOnError</td>
<td valign="top">Stop the buildprocess if the RPM build command exits with
a non-zero retuncode. Defaults to false</td>
<td align="center" valign="top">No</td>
</tr>
</table>


+ 15
- 15
src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java View File

@@ -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 <tt>true</tt> if it should halt, otherwise
* <tt>false</tt>
* If <code>true</code>, stop the build process when the rpmbuild command
* exits with an error status.
* @param value <code>true</code> if it should halt, otherwise
* <code>false</code>. The default is <code>false</code>.
*
* @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 <tt>true</tt> if output should be logged, otherwise
* <tt>false</tt>
* If true, output from the RPM build command will only be logged to DEBUG.
* @param value <code>false</code> if output should be logged, otherwise
* <code>true</code>. The default is <code>false</code>.
*
* @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) {


Loading…
Cancel
Save