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

Bug#494468: locales: Postist violates Debian policy (10.7.3) by not preserving changes to /etc/locale.gen



Package: locales
Version: 2.7-13
Severity: serious
Justification: Policy 10.7.3


Postinst script of locales rewrites /etc/locale.gen with values based
on debconf settings without preserving user changes to that file.

I'm in a situation where I can't use locales' debconf interface to choose
locales, because I need my /etc/locale.gen to contain:

en_US UTF-8
cs_CZ UTF-8
sk_SK UTF-8
cs_CZ.ISO-8859-2 ISO-8859-2
cs_CZ.CP1250 CP1250
sk_SK.ISO-8859-2 ISO-8859-2

I didn't find a way how to configure these locales using debconf,
because it doesn't offer me most locales I need (no CP1250 there,
offers just "cs_CZ ISO-8859-2" and "cs_CZ.UTF-8 UTF-8", which is not
what I want), and these even don't appear there after manually
putting them in /etc/locale.gen.

I have no problem with editing /etc/locale.gen to contains what I need,
but rewriting /etc/locale.gen from locale.gen causes trouble when on
locales update - the postinst either generates and empty locale.gen
(because I don't use debconf so there is no debconf setting) and deletes
all my generated locales, or fails because of a workaround based on
"chattr +i /etc/locale.gen".

I see two ways to solve this problem:

1) (suggested) make locales follow Debian policy and preserve those
   changes.

2) remove /etc/locale.gen and use only debconf settings for the
   locale-gen command (/etc/locale.gen cannot be called debian config
   file right now because of that rewriting, and moving it somewhere to
   /var as a differently-formated cache for debconf locale settings
   would be quite weird, that's why to remove). But this could cause
   more trouble to people like me who need to use settings that aren't
   offered in debconf interface.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=cs_CZ.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

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

locales recommends no packages.

locales suggests no packages.

-- debconf information:
* locales/default_environment_locale: None
* locales/locales_to_be_generated:



Reply to: