Red Hat Bugzilla – Bug 119186
less.csh bombs out if LANG isn't defined
Last modified: 2007-11-30 17:07:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Description of problem:
If /etc/sysconfig/i18n does not exist and GDM_LANG is not set,
/etc/profile.d/lang.csh leaves LANG undefined.
/etc/profile.d/less.csh then fails in:
if ( $?LC_ALL ) then
setenv LANGVAR $LC_ALL
setenv LANGVAR $LANG
RH9 did not have this problem.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Remove LANG from the environment
2. Run tcsh
Actual Results: You see the error message:
LANG: Undefined variable.
and the user's dotfiles are not evaluated.
LANG is always set in Red Hat Linux. Lots of applications will break
if you remove random environment variables.
Please set LANG to C (setenv LANG C) if you want to have default
Just as an application should not dump core for lack of an environment
variable, a cshrc fragment should not bomb out for lack of one either.
Given that it is trivial to fix this bug, correctness alone argues
for a fix rather than an excuse.
(Also, empirically, running without a LANG setting worked fine in RH9,
with the exception of some "man" issues which also applied to LANG=C.
So it is not true that "lots of applications will break" in this case.)