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

Bug#592216: locales: Preseed debconf value for default locale ignored



Package: locales
Version: 2.7-18lenny2
Severity: normal


If you try to preseed the default locale value in debconf (eg. via
"debconf-set-selections"), it seems to be ignored and overwritten
with "None" instead.  For example:

# rm -f /etc/default/locale
# debconf-get-selections | grep default_env
locales	locales/default_environment_locale	select	en_GB.UTF-8
# dpkg-reconfigure --frontend=noninteractive locales
Generating locales (this might take a while)...
  en_GB.ISO-8859-1... done
  en_GB.ISO-8859-15... done
  en_GB.UTF-8... done
Generation complete.
# debconf-get-selections | grep default_env
locales	locales/default_environment_locale	select	None
# cat /etc/default/locale
cat: /etc/default/locale: No such file or directory

I came across this because I was trying to preseed the default locale
when deploying Debian using FAI.  Setting "locales_to_be_generated"
the same way works fine though.

Issue seems to be in "/var/lib/dpkg/info/locales.config".  At line 468
it checks whether "LANG" is set in either "/etc/default/locale"
(file generated by "update-locale" in the "postinst" script) or
"/etc/environment".  If neither (or the value is invalid), which is
the case in a fresh debootstrap install, it sets the value to "None"
overwriting any existing value in debconf.

Thanks,
Chris


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages locales depends on:
ii  debconf [debconf-2.0]       1.5.24       Debian configuration
management sy
ii  libc6 [glibc-2.7-1]         2.7-18lenny2 GNU C Library: Shared libraries

locales recommends no packages.

locales suggests no packages.

-- debconf information:
* locales/default_environment_locale: en_GB.UTF-8
* locales/locales_to_be_generated: en_GB ISO-8859-1, en_GB.ISO-8859-15
ISO-8859-15, en_GB.UTF-8 UTF-8



Reply to: