DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23107>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23107

condition checksum always sets property to true

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From [EMAIL PROTECTED]  2003-09-11 16:45 -------
This is not a bug.
The build script sets the checksums with the 
checksum task, and then uses the condition
to see if they are the same.

see following script for example of
changing the file after working out
the checksum

<project name="testChecksum" default="test" basedir=".">
  <fileset dir=".">
    <patternset id="files">
      <include name="*.txt"/>
    </patternset>
  </fileset>

  <target name="init">
    <delete quiet="yes" file="1.txt"/>
    <delete quiet="yes" file="2.txt"/>
    <concat destfile="1.txt">
      this is file 1
    </concat>
    <concat destfile="2.txt">
      this is file 2
    </concat>
  </target>

  <fileset dir=".">
    <patternset id="files">
      <include name="*.txt"/>
    </patternset>
  </fileset>

  <target name="test" depends="init">
    <checksum fileext=".checksum">
      <fileset dir=".">
        <patternset refid="files"/>
      </fileset>
    </checksum>

    <concat destfile="2.txt">
      this is file 2 changed
    </concat>
    
    <condition property="isSame">
      <checksum fileext=".checksum">
        <fileset dir=".">
          <patternset refid="files"/>
        </fileset>
      </checksum>
    </condition>

    <echo message="isSame = ${isSame}"/>
  </target>

</project>

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

Reply via email to