Bug 119186 - less.csh bombs out if LANG isn't defined
less.csh bombs out if LANG isn't defined
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: less (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-25 20:29 EST by Greg Hudson
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-29 04:23:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Greg Hudson 2004-03-25 20:29:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

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
  else
    setenv LANGVAR $LANG
  endif

RH9 did not have this problem.


Version-Release number of selected component (if applicable):
less-378-11

How reproducible:
Always

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.
Comment 1 Karsten Hopp 2004-03-29 04:23:17 EST
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 
behaviour. 
Comment 2 Greg Hudson 2004-03-29 05:32:15 EST
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.)

Note You need to log in before you can comment on or make changes to this bug.