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 17154] New: - concat task: if destination file is used as source infinite looping occurs
Date Tue, 18 Feb 2003 08:49:11 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=17154>.
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=17154

concat task: if destination file is used as source infinite looping occurs

           Summary: concat task: if destination file is used as source
                    infinite looping occurs
           Product: Ant
           Version: 1.5.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: Christian.Eitner@cern.ch


I want to prepend the current changes to my changes file:

<target name = "Produce changes file">
  <concat destfile = "Temp.changes" append = "true">
    <filelist dir = "${basedir}"
      files = "CurrentChanges, Temp.changes"/>
  </concat>
</target>

Ant output:
Produce changes file:
  [concat] Temp.changes: input file is output file.

Result: infinite loop, which prepends the contents of "CurrentChanges" over 
and over again.

Expected: stop after one loop iteration (because detection of unusual state 
seems to take place already)

I know this problem can be circumvented by writing to a temporary file and 
moving it afterwards.

Mime
View raw message