[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-dev
Subject:    DO NOT REPLY [Bug 39122]  New:  - uptodate treats an outdated target as up to date
From:       bugzilla () apache ! org
Date:       2006-03-27 19:18:44
Message-ID: bug-39122-472 () http ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=39122

           Summary: uptodate treats an outdated target as up to date
           Product: Ant
           Version: 1.6.5
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: dlsmith@users.sourceforge.net


uptodate does not seem to handle target directories properly.  It will incorrectly \
determine that a  generated directory with an out-of-date timestamp is actually up to \
date.  Example script:

<project name="test-uptodate">

  <target name="update-source" >
    <touch file="source" />
    <echo message="Source updated.  Target is out of date." />
  </target>

  <target name="update-target" depends="check-generate" unless="generated" >
    <delete dir="target" />
    <mkdir dir="target" />
  </target>

  <fileset id="source-files" dir="${basedir}" includes="source" />

  <target name="check-generate">
    <uptodate property="generated" targetfile="target">
      <srcfiles refid="source-files" />
    </uptodate>
  </target>

</project>


If, in an empty directory, I do the following:
- ant update-source (to generate the source file)
- ant update-target (to generate the target directory)
- ant update-source (to change the timestamp on the source file)
- ant update-target (to generate a *new* target directory)

On the second "update-target" uptodate incorrectly determines that the directory is \
up to date.

If I modify my script to do the following:
 <uptodate property="generated" srcfile="source" targetfile="target" />
it will work as expected.

It also works as expected if I generate a target *file* instead of a target \
*directory*.

I've tested this now under Ant 1.6.5 and 1.6.2, and on two different Java 1.5.0 \
platforms.  I submitted a  message about the problem to the users mailing list, and \
got no response, so I assume this is not a  problem that has been recognized \
previously.

—Dan Smith

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic