Patch is attached (based on todays CVS checkout) that updates the manual
and uses quiet instead of showOutput. I also made some very small
changes to the manual entry for RPM to consistently capitalize the first
character of the parameter descriptions.

Zach Garner

On Thu, 2005-03-17 at 14:36 +0100, Stefan Bodewig wrote:
> On Thu, 17 Mar 2005, Zach Garner <[EMAIL PROTECTED]> wrote:
> >> > - Provide a way to quiet the RPM build process.
> >> 
> >> Maybe rename (and revert the logic) the attribute from showOutput
> >> to quiet?
> > 
> > I can submit a patch to CVS that uses quiet instead of showOutput if
> > you'd like.
> 
> I'd prefer that.
> 
> > I'll get the mannual patch to you as soon as I can.
> 
> Still a week or two before we cut the 1.6.3 release candidate.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Index: docs/manual/OptionalTasks/rpm.html
===================================================================
RCS file: /home/cvspublic/ant/docs/manual/OptionalTasks/rpm.html,v
retrieving revision 1.9
diff -u -r1.9 rpm.html
--- docs/manual/OptionalTasks/rpm.html	7 Mar 2005 18:11:14 -0000	1.9
+++ docs/manual/OptionalTasks/rpm.html	3 Apr 2005 16:27:52 -0000
@@ -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 @@
   </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 @@
   </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>
Index: src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java,v
retrieving revision 1.26
diff -u -r1.26 Rpm.java
--- src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java	21 Mar 2005 13:50:09 -0000	1.26
+++ src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java	3 Apr 2005 16:27:59 -0000
@@ -95,10 +95,10 @@
     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 @@
         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 @@
                 } 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 @@
                 }  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 @@
     }
 
     /**
-     * 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 @@
     }
 
     /**
-     * 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;
     }
 
     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to