ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23107] - condition checksum always sets property to true
Date Thu, 11 Sep 2003 16:45:12 GMT
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

peter.reilly@corvil.com changed:

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



------- Additional Comments From peter.reilly@corvil.com  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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message