bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tweaking default `ls -l` output to use locale before posix


From: Mike Frysinger
Subject: Re: tweaking default `ls -l` output to use locale before posix
Date: Mon, 26 Sep 2005 01:02:27 -0400
User-agent: KMail/1.8.2

On Monday 26 September 2005 12:40 am, Paul Eggert wrote:
> Mike Frysinger <address@hidden> writes:
> > Gentoo has been using this patch too for
> > quite some time too ;)
>
> Debian doesn't have the patch, and I suspect other distributions don't
> either.  So we have a real split here.

RedHat/Fedora have been using it for quite sometime i think ... it's called 
'fileutils-4.1.10-timestyle.patch' in their rpms, and i believe it dates back 
to before the big fileutils/textutils/sh-utils merge into coreutils ...

> At the very least, Mandrake and Gentoo's patch should not look at
> POSIXLY_CORRECT, as this is not a POSIX-conformance issue.  If they
> want to change the default, they should simply replace

indeed ... i admit we just copied the patch straight from Mandrake and didnt 
fully investigate the POSIX aspects of it since as you pointed out, looking 
at the source quickly seems to imply that it is POSIX behavior to default to 
posix output style

>     if (! (style = getenv ("TIME_STYLE")))
>       style = "posix-long-iso";
>
> with
>
>     if (! (style = getenv ("TIME_STYLE")))
>       style = "locale";
>
> without looking at POSIXLY_CORRECT.  Could you please have this fixed
> in the source?  (I suspect it's easy for you to fix this with Gentoo
> at any rate....)

yep, i'll fix it in Gentoo in the next day or so, thanks for the pointers

> One possibility is to make this all easier to configure without
> patching the source, e.g., with an
>
>    #ifndef TIME_STYLE_DEFAULT
>    # define TIME_STYLE_DEFAULT "posix-long-iso"
>    #endif
>    ...
>
>     if (! (style = getenv ("TIME_STYLE")))
>       style = TIME_STYLE_DEFAULT;
>
> in the source code, and then let Mandrake and Gentoo configure with
> the appropriate CPPFLAGS.

just as easy to patch as to setup a CPPFLAG i think ...

> But before we go off the deep end here, why exactly is this change a
> good idea?

the idea is to make the default output as intuitive as possible ... imo, 
defaulting to one's locale time format instead of a POSIX one makes more 
sense ... but i wouldnt be suprised if others felt differently :)

> If it's just a personal preference, then the TIME_STYLE
> environment variable addresses the issue, no?  Perhaps Mandrake and/or
> Gentoo could simply set TIME_STYLE=locale in their users' standard
> startup files?

yes, that could be done, but one thing ive noticed working with Gentoo is that 
it's quite common for people to create new users 'by hand' ... that is, the 
skel dir isnt put into place quite as often as it should

also, going back to the intuitive behavior i mentioned previously, i generally 
try to push changes upstream so everyone benefits rather than just 
Gentoo/whoever ... thus i started bugging you guys
-mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]