On Wed, Apr 18, 2007 at 05:11:38AM +0200, Jim Meyering wrote:
> Justin Pryzby <[EMAIL PROTECTED]> wrote:
> > This bug is not fixed.  The code in coreutils-6.9 fails to treat -D as
> > an option independent of -P and -L.  This has the effect that -D implies
> > -L, and du -DL is not the same as du -LD.
> 
> Please provide an example demonstrating this.
> Or point to parts of the code and explain how that can be true.
So I think we agree on the intended behavior.

> FYI the relevant parts sure seem orthogonal to me:
  int symlink_deref_bits = FTS_PHYSICAL;

>       case 'D': /* This will eventually be 'H' (-H), too.  */
>         symlink_deref_bits = FTS_COMFOLLOW | FTS_PHYSICAL;
>         break;
> 
>       case 'L': /* --dereference */
>         symlink_deref_bits = FTS_LOGICAL;
>         break;
> 
>       case 'P': /* --no-dereference */
>         symlink_deref_bits = FTS_PHYSICAL;
>         break;
I'm afraid my example was wrong.

If I call du -DP I get symlink_deref_bits=FTS_PHYSICAL, but if I call
du -PD I get symlink_dref_bits=FTS_COMFOLLOW|FTS_PHYSICAL.

-L and -P are not independent (as intended); -D (eventually known as
-H) *should* be independent.  (-L internally implies -D, but
applications don't have to and shouldn't deal with this).


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to