List Info

Thread: Re: -delete requires -depth




Re: -delete requires -depth
user name
2007-08-23 05:11:23
I am proposing to make this change in findutils-4.3.9.   
Any objections?

On 8/23/07, James Youngman <jaygnu.org> wrote:
> 2007-08-23  James Youngman  <jaygnu.org>
>
>         The -delete action now requires -depth rather
than automatically
>         turning it on.
>         * find/parser.c (parse_delete): Require -depth
to be selected, but
>         don't turn it on by default.  This fixes
Savannah bug #20865.
>         (HISTORY): Indicate when we introduced this
change.
>         * doc/find.texi (Cleaning Up): Comply with this
requirement.
>         * find/testsuite/find.gnu/delete.exp: Comply.
>         * find/testsuite/find.gnu/deletefile.exp:
Comply.
>         * find/testsuite/find.gnu/deletedir.exp:
Comply.
>         * doc/find.texi (Deleting Files): Document this
requirement.
>         * find/find.1 (-delete): Document it.
>         * NEWS: Mention this change.



Re: -delete requires -depth
country flaguser name
United States
2007-08-23 07:59:37
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 8/23/2007 4:11 AM:
> I am proposing to make this change in findutils-4.3.9. 
  Any objections?

Bruno raised the objection on savannah that this approach is
not
backwards-compatible (ie. scripts that used just -delete
will now fail to
do anything).  However, I tend to agree with the idea that
if we are
changing the behavior of -delete, an explicit error that
explains what is
missing is important.  Bruno also had the idea of letting
-delete operate
without -depth, by letting -delete swap the traversal of
that subtree to
depth-first while the rest of the traversal is breadth-first
prior to
encountering the -delete action.  I'm not sure that is
possible, since my
understanding of fts() is that the traversal pattern is
picked up front.

In other words, let's think this over a bit more before
checking anything in.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFGzYS584KuGfSFAYARAtPKAJ41qBFR2M04WXyMr66ffPtvwBgOfACf
VuYc
rnm6HKJNFY6aXUeTWwfJrvQ=
=56zZ
-----END PGP SIGNATURE-----



Re: -delete requires -depth
user name
2007-08-23 17:06:54
On Thu, Aug 23, 2007 at 11:11:23AM +0100, James Youngman
wrote:
> I am proposing to make this change in findutils-4.3.9. 
  Any objections?
> 
> On 8/23/07, James Youngman <jaygnu.org> wrote:
> > 2007-08-23  James Youngman  <jaygnu.org>
> >
> >         The -delete action now requires -depth
rather than automatically
> >         turning it on.
> >         * find/parser.c (parse_delete): Require
-depth to be selected, but
> >         don't turn it on by default.  This fixes
Savannah bug #20865.

This change will certainly break my scripts.

I'm sure you can find a way to resolve potential confusion
mentioned in
#20865 without breaking backwards compatibility.


-- 
ldv
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )