https://bugzilla.novell.com/show_bug.cgi?id=695637 https://bugzilla.novell.com/show_bug.cgi?id=695637#c0 Summary: tcsh / coreutils ls time format changed or wrong Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: volker3204@paradise.net.nz QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (compatible; Konqueror/4.6; Linux) KHTML/4.6.0 (like Gecko) SUSE There are some strange things happening with time formats displayed by ls. It seems to be shell dependent too. It's definitely different from oS 11.1. Old behaviour under oS 11.1 tcsh:
echo "$LS_OPTIONS" ; echo "$TIME_STYLE" -N --color=never -T 0 TIME_STYLE: Undefined variable. ls -l file -rw------- 1 user user 0 2011-05-24 22:03 file /bin/ls -l file -rw------- 1 user user 0 2011-05-24 22:03 file
The default was long-iso, for both built-in and coreutils ls. oS 11.4 tcsh:
echo "$LS_OPTIONS" ; echo "$TIME_STYLE" -N --color=always -T 0 --time-style=long-iso TIME_STYLE: Undefined variable. ls -l file -rw------- 1 user user 0 May 24 22:00 file /bin/ls -l file -rw------- 1 user user 0 May 24 22:00 file
Ok the default changed. Let's set a new default:
echo "$LS_OPTIONS" ; echo "$TIME_STYLE" -N --color=always -T 0 --time-style=long-iso TIME_STYLE: Undefined variable. ls -l file -rw------- 1 user user 0 May 24 22:00 file /bin/ls -l file -rw------- 1 user user 0 May 24 22:00 file
Oops. The documentation promises --time-style to work.
ls $LS_OPTIONS -l file -rw------- 1 user user 0 2011-05-24 22:00 file /bin/ls $LS_OPTIONS -l file -rw------- 1 user user 0 2011-05-24 22:00 file
Explicitly on the command line it works, but not from LS_OPTIONS. That's a bug.
echo "$LS_OPTIONS" ; echo "$TIME_STYLE" -N --color=always -T 0 --time-style=full-iso long-iso ls -l file -rw------- 1 user user 0 2011-05-24 22:00 file /bin/ls -l file -rw------- 1 user user 0 2011-05-24 22:00 file
So TIME_STYLE takes priority over LS_OPTIONS. How annoying, but someone may have intended that. But ls and /bin/ls only consider the time style in TIME_STYLE and ignore the setting in LS_OPTIONS. That's a bug. man ls doesn't even mention TIME_STYLE; guess it's incomplete. info ls is quite clear, and that's how things should be. That means /bin/ls and tcsh builtin ls are both buggy. The following is inside bash -l:
echo "$LS_OPTIONS"; echo "$TIME_STYLE" -N --color=tty -T 0 long-iso ls -l file -rw------- 1 user user 0 2011-05-24 22:00 file /bin/ls -l file -rw------- 1 user user 0 2011-05-24 22:00 file
Ohoh: bash still behaves like it used to.
echo "$LS_OPTIONS"; echo "$TIME_STYLE" -N --color=tty -T 0 --time-style=full-iso long-iso ls -l file -rw------- 1 user user 0 2011-05-24 22:00:05.000000000 +1200 file /bin/ls -l file -rw------- 1 user user 0 2011-05-24 22:00 file
bash built-in gives expected output, as does /bin/ls.
echo "$LS_OPTIONS"; echo "$TIME_STYLE" -N --color=tty -T 0 --time-style=full-iso
ls -l file -rw------- 1 user user 0 2011-05-24 22:00:05.000000000 +1200 file /bin/ls -l file -rw------- 1 user user 0 May 24 22:00 file
bash built-in is correct. /bin/ls is buggy. --> /bin/ls coreutils changed and is now buggy. I suspect tcsh doesn't have a built-in for ls and uses /bin/ls instead. Is this a suse or upstream bug in coreutils? Reproducible: Always Steps to Reproduce: See above I have some vague memories of having had a similar problem with ls in a suse release some years ago. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.