On Thu, Jun 30, 2016 at 12:19 PM, Christoph Biedl
<debian.a...@manchmal.in-ulm.de> wrote:
>> If POSIXLY_CORRECT is not set in the environment then the documentation
>> in "file --help" describing the -L argument as "(default)" is not true.
>
> How?

This is all a bit moot since we're discussing a bug in file-5.11 which
is no longer present in 5.14. But since you asked:

I don't have POSIXLY_CORRECT set to anything or the empty string.
The problem is just that `file --help' says

04:53:18 dave@bb:/t/a$ file --help | grep default
  -L, --dereference          follow symlinks (default)
04:59:15 dave@bb:/t/a$ POSIXLY_CORRECT=yes file --help | grep default
  -L, --dereference          follow symlinks (default)

but behaves as though -h is the default... except when POSIXLY_CORRECT
is defined, in which case the help text is correct.

04:52:41 dave@bb:/t/a$ ls -l
total 0
-rw-r--r-- 1 dave dave 0 Jul  2 04:52 empty
lrwxrwxrwx 1 dave dave 5 Jul  2 04:52 link -> empty
04:52:42 dave@bb:/t/a$ file --version
file-5.11
magic file from /etc/magic:/usr/share/misc/magic
04:52:54 dave@bb:/t/a$ file link
link: symbolic link to `empty'
04:53:00 dave@bb:/t/a$ file -h link
link: symbolic link to `empty'
04:53:15 dave@bb:/t/a$ file -L link
link: empty

In 5.14 the help text is changed to in just such a way as to mention
this behavior. If Debian is sticking with 5.11 for a while then you might
want to backport this:

04:54:17 dave@Vger:/t/a$ file --help | grep default
  -L, --dereference          follow symlinks (default if POSIXLY_CORRECT is set)
  -h, --no-dereference       don't follow symlinks (default if
POSIXLY_CORRECT is not set)

Dave

Reply via email to