[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#365628: marked as done (postinst fails when LANG doesn't point to a valid locale)



Your message dated Fri, 19 May 2006 23:17:26 +0200
with message-id <20060519211726.GA12963@linuxfr.org>
and subject line Bug#365628: postinst fails when LANG doesn't point to a valid locale
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: locales
Version: 2.3.6-7
Severity: important
Tags: patch

# LANG=xx_XX DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
[...]
*** update-locale: Error: invalid locale settings:

when "update-locale LANG" is invoked, it verified LANG variable and, if invalid,
aborts the script.

The typical situation when this happens is:

  - You had belocs-locales-data installed.
  - You had LANG set to a locale that is only available in belocs, and not in
    glibc locales.
  - You attempt to replace belocs-locales-data with glibc locales.

The following fix worked for me:

--- /var/lib/dpkg/info/locales.postinst~        2006-04-14 15:45:25.000000000 +0200
+++ /var/lib/dpkg/info/locales.postinst 2006-05-01 17:46:22.000000000 +0200
@@ -66,7 +66,7 @@
     # Set default LANG environment variable
     if [ -e $EE ]; then
         # Remove previous definitions
-        /usr/sbin/update-locale LANG
+        LANG= /usr/sbin/update-locale LANG
     fi
     if [ -n "$SELECTED" ] && [ "$SELECTED" != "None" ]; then
         /usr/sbin/update-locale "LANG=$SELECTED"

But according to the manpage, I don't see why update-locale should care about
the LANG env variable.  Perhaps the problem is there?

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages locales depends on:
ii  debconf [debconf-2.0]         1.4.72     Debian configuration management sy
ii  libc6 [glibc-2.3.6-2]         2.3.6-7    GNU C Library: Shared libraries

locales recommends no packages.

-- debconf information excluded


--- End Message ---
--- Begin Message ---
Version: 2.3.6-8

On Fri, May 05, 2006 at 01:55:09AM +0200, Denis Barbier wrote:
> On Wed, May 03, 2006 at 03:30:56PM +0200, Robert Millan wrote:
> > > Several problems have been reported because of inconsistencies between
> > > LANG and LANGUAGE, so I try to make sure that selected locale is usable.
> > > If these consistency checks make more harm than good, they will be dropped.
> > 
> > AIUI, the checks update-locale is expected to do (and those --no-checks avoids)
> > are the ones passed as arguments (ala update-locale LANG=foo).  The manpage
> > doesn't make any reference to variables passed through the environment.
> 
> You are right, this is fixed now.
> Thanks.

This has been fixed in 2.3.6-8, but I forgot to add the bug closer.
Thanks for your report.

Denis

--- End Message ---

Reply to: