Bug 119186 - less.csh bombs out if LANG isn't defined
Summary: less.csh bombs out if LANG isn't defined
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: less
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-26 01:29 UTC by Greg Hudson
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-29 09:23:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Greg Hudson 2004-03-26 01:29:23 UTC
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 09:23:17 UTC
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 10:32:15 UTC
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.