You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dave Glowacki <dg...@ssec.wisc.edu> on 2004/03/06 00:13:28 UTC
without following symlinks
I've got a build file which runs a Unix program to set up a build
directory. Among other tasks, this Unix program creates symbolic links
to several directories of utility programs.
One of the first commands the build.xml file contains is <delete
dir="${builddir}">, which attempts to follow the symlinks and delete
everything in the symlinked directories, which is NOT what I want to
have happen.
Is there an option for the <delete> task telling it not to follow
symlinks?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: without following symlinks
Posted by Dave Glowacki <dg...@ssec.wisc.edu>.
On Mar 5, 2004, at 6:15 PM, RADEMAKERS Tanguy wrote:
> Dave Glowacki wrote:
>> I've got a build file which runs a Unix program to set up a build
>> directory. Among other tasks, this Unix program creates symbolic
>> links to several directories of utility programs.
>>
>> One of the first commands the build.xml file contains is <delete
>> dir="${builddir}">, which attempts to follow the symlinks and delete
>> everything in the symlinked directories, which is NOT what I want to
>> have happen.
>>
>> Is there an option for the <delete> task telling it not to follow
>> symlinks?
>
> you could use a nested <fileset> with a followsymlinks="false"
> attribute.
>
> see the manual page on FileSet.
Thanks for the suggestions. So far, I'm up to this:
<delete includeEmptyDirs="yes">
<fileset dir="workdir" followsymlinks="no" defaultexcludes="no"/>
</delete>
which doesn't follow symlinks but also doesn't delete the symlinks
themselves.
Any ideas? (I'm using ant 1.6.0, but I didn't see anything related to
this in the 1.6.1 release notes)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: without following symlinks
Posted by RADEMAKERS Tanguy <ta...@swift.com>.
you could use a nested <fileset> with a followsymlinks="false" attribute.
see the manual page on FileSet.
/t
Dave Glowacki wrote:
> I've got a build file which runs a Unix program to set up a build
> directory. Among other tasks, this Unix program creates symbolic
> links to several directories of utility programs.
>
> One of the first commands the build.xml file contains is <delete
> dir="${builddir}">, which attempts to follow the symlinks and delete
> everything in the symlinked directories, which is NOT what I want to
> have happen.
>
> Is there an option for the <delete> task telling it not to follow
> symlinks?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: without following symlinks
Posted by Peter Reilly <pe...@corvil.com>.
There was a reponse to this e-mail that I deleted by accident.
One can use embedded filesets with followsymlinks, however
this does not work for all cases. I think that the "followsymlinks"
should be in the delete task as well. In this case, any directories
returned by the embedded filesets, or the directories returned from
the recursive deletion of the dir attribute will be tested for symbolic
linkness.
In the meantime, <delete dir="build"/> is extremely dangeous to
use if you are inclined to use symbolic links in the build directory.
(I was bitten by this :-[ ).
Peter
Dave Glowacki wrote:
> I've got a build file which runs a Unix program to set up a build
> directory. Among other tasks, this Unix program creates symbolic
> links to several directories of utility programs.
>
> One of the first commands the build.xml file contains is <delete
> dir="${builddir}">, which attempts to follow the symlinks and delete
> everything in the symlinked directories, which is NOT what I want to
> have happen.
>
> Is there an option for the <delete> task telling it not to follow
> symlinks?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org