Bug#527888: localepurge: does not correctly santize locale

2009-05-09 Thread Jakub Wilk

Package: localepurge
Version: 0.5.9-0.2
Severity: normal

localepurge tries to sanitize locale settings by exporting LANG=C. This 
is incorrect, as LC_* variables take precedence over LANG. The correct 
way to do this is to export LC_ALL=C.


Reference:

$ man -e posix locale | grep -A1 -B9 'override the values' | cut -c 8-
The  following  environment  variables  shall  affect  the execution of
locale:

LANG   Provide a default value for the  internationalization  variables
   that  are  unset  or  null.  (See the Base Definitions volume of
   IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
   ables  for the precedence of internationalization variables used
   to determine the values of locale categories.)

LC_ALL If set to a non-empty string value, override the values  of  all
   the other internationalization variables.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages localepurge depends on:
ii  debconf [debconf-2.0] 1.5.26 Debian configuration management sy
ii  locales   2.9-12 GNU C Library: National Language (
ii  procps1:3.2.7-11 /proc file system utilities
ii  ucf   3.0018 Update Configuration File: preserv

localepurge recommends no packages.

Versions of packages localepurge suggests:
pn  debfoster none (no description available)
ii  deborphan 1.7.28 program that can find unused packa

-- debconf information excluded

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#527888: localepurge: does not correctly santize locale

2009-05-09 Thread Jakub Wilk

tags 527888 + patch
thanks

--
Jakub Wilk
diff --git a/localepurge b/localepurge
--- a/localepurge
+++ b/localepurge
@@ -28,7 +28,7 @@
 fi
 
 # Make sure to exclude running under any locale other than C:
-export LANG=C
+export LC_ALL=C
 
 if [ $1 = -debug ] || [ $1 = -d ] \
 || [ $2 = -debug ] || [ $2 = -d ]; then