ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Effects of the createTempFile change
Date Wed, 25 Jun 2003 10:03:25 GMT
the main effect for me is this here, when I try to bootstrap Ant:

Failed to transform /home/bodewig/ASF/jakarta/jakarta-ant/bootstrap/bin/lcp.bat to /home/bodewig/ASF/jakarta/jakarta-ant/bootstrap/bin/lcp.bat.
Couldn't rename temporary file: /tmp/fixcrlf468853916

The reason is that /tmp and /home are on different file systems and
File#renameTo won't work accross file system boundaries.

The easy solution would be to revert Antoine's patch, but I think it
shows a deeper problem.  There are several tasks that assume failure
of File#renameTo was a fatal problem, where it would be correct to
fall back to copy then remove old file instead.

I propose to create a new renameTo method in FileUtils that tries
File#renameTo and falls back to copy+delete if that fails and throws
an exception if the later fails as well - after that grep for all
occurances of renameTo in Ant and replace them.

I volunteer to do the work but can't promise I'll complete it this
week (depends on the amount of grep-find hits and the work-load I'll
face in my day job).

If Sam's machine has /tmp on a filesystem different than his Gump
installation we are going to receive a couple of nag mails and cause
nag-mails for quite a few other projects as well (any project that
uses <fixcrlf>).  For dist-ant and the other projects doing nightly
builds with Gump these failures are fatal.

Stefan

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


Mime
View raw message