[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works
From: |
Jim Meyering |
Subject: |
Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works |
Date: |
Sun, 06 Apr 2008 10:25:57 +0200 |
Eric Cooper <address@hidden> wrote:
> Package: coreutils
> Version: 6.10-3
> Severity: normal
>
> The --time-style=locale option to ls no longer behaves as documented.
>
> $ locale
> LANG=en_US.UTF-8
...
>
> $ ls --version
> ls (GNU coreutils) 6.10
> ...
>
> $ /bin/ls --time-style=locale -l passwd
> -rw-r--r-- 1 root root 765 2007-12-07 12:42 passwd
>
> It worked fine in version 5.97:
>
> $ ls --version
> ls (GNU coreutils) 5.97
> ...
>
> $ /bin/ls --time-style=locale -l passwd
> -rw-r--r-- 1 root root 765 Dec 7 17:42 passwd
Thanks for the report.
Interestingly, that does work for any non-English locale.
>From comparing strace output with en_US and with any non-English
locale, this appears to be because coreutils doesn't provide
any English ("en") translations (fyi, actually upstream gets its
translations from translationproject.org, and they don't
have English ones).
$ ls /usr/share/locale/en*/LC_TIME/coreutils.mo
zsh: no matches found: /usr/share/locale/en*/LC_TIME/coreutils.mo
[Exit 1]
$ ls /usr/share/locale/fr/LC_TIME/coreutils.mo
/usr/share/locale/fr/LC_TIME/coreutils.mo@
It works fine for all other locales:
$ LC_ALL=fr_FR /bin/ls --time-style=locale -ldgo /
drwxr-xr-x 42 1024 mar 13 12:02 /
$ LC_ALL=de_DE /bin/ls --time-style=locale -ldgo /
drwxr-xr-x 42 1024 13. Mär 12:02 /
A work-around, from "info coreutils ls":
The `LC_TIME' locale category specifies the timestamp format.
The default POSIX locale uses timestamps like `Mar 30 2002'
and `Mar 30 23:45'; in this locale, the following two `ls'
invocations are equivalent:
newline='
'
ls -l --time-style="+%b %e %Y$newline%b %e %H:%M"
ls -l --time-style="locale"
Odd. I see that with LC_ALL=en, it *does* work:
LC_ALL=en ./ls --time-style=locale -dl /
drwxr-xr-x 42 root root 1024 Mar 13 12:02 /
I probably won't address this for the upcoming release, but if
someone else is interested, suggestions/patches are welcome.
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works,
Jim Meyering <=
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Andreas Schwab, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Bo Borgerson, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Jim Meyering, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Bo Borgerson, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Michael Stone, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Bo Borgerson, 2008/04/06
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Paul Eggert, 2008/04/07
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Micah Cowan, 2008/04/07
- Re: Bug#474436: coreutils: "ls --time-style=locale" no longer works, Jim Meyering, 2008/04/08