ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Patch for 22863 (efficent rename of dirs) breaks Gump build
Date Mon, 20 Sep 2004 08:45:52 GMT
Just an idea: could we check if the target dir is empty and when empty
delete that before
"moving"? Hmm - what handling of access rights?

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Stefan Bodewig [mailto:bodewig@apache.org]
> Gesendet am: Montag, 20. September 2004 10:27
> An: dev@ant.apache.org
> Betreff: Patch for 22863 (efficent rename of dirs) breaks Gump build
> 
> Hi,
> 
> the fix for 22863 which allows <move>'s file attribute to point to a
> directory breaks the tomcat-dbcp build in Gump:
> <http://brutus.apache.org/gump/public/jakarta-tomcat-5/jakarta
> -tomcat-dbcp/gump_work/build_jakarta-tomcat-5_jakarta-tomcat-d
> bcp.html>
> 
> The build does this:
> 
>   <move todir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp">
>     <fileset dir="${tomcat-dbcp.home}/src/java/org/apache/commons" />
>   </move>
> 
> where ${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp exists prior
> to invoking the task.  This assumes that all files and directories
> from below ${tomcat-dbcp.home}/src/java/org/apache/commons will get
> moved and it works for all older versions of Ant.
> 
> Since the fileset matches all files and directories and neither of
> them is present in the dbcp directory before the move (in fact it is
> empty), ${tomcat-dbcp.home}/src/java/org/apache/commons is added to
> completeDirMap and renameFile is tried.
> 
> With the fix for 22863 renameFile has been changed to throw a
> BuildException if we try to rename a directory to an existing
> directory (thus the failure above) while the old code would simply
> return false and make Ant take the hard route of copying all files
> individually.
> 
> It would be easy to revert the changes made to renameFile around line
> 385 - and I've confirmed that it will make the Tomcat build pass again
> - but I'm afraid I'm missing something.  In particular since it will
> break testCompleteDirectoryMoveFileToDirWithExistingDir in MoveTest.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message