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

Bug#724456: locales: regeneration of locales by locale-gen breaks programs; should be done in a temporary file



Package: locales
Version: 2.17-93
Severity: normal

The regeneration of all the locales by /usr/sbin/locale-gen is slow,
so that it sometimes breaks programs. It currently removes the
/usr/lib/locale/locale-archive file to rebuild it, and until the
used locales are available, various programs (e.g. executed by cron)
break.

Instead the new locales should be built in a temporary file, say
/usr/lib/locale/locale-archive.tmp, and a mv should be done at the
end.

I can see 2 solutions (untested):

1. Create a temporary directory and use the --prefix localedef option.
This is rather inelegant, though (IMHO).

2. Modify localedef to add a new option to be able to provide a
new archive file name, and use this option.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages locales depends on:
ii  debconf [debconf-2.0]  1.5.51
ii  libc6 [glibc-2.17-1]   2.17-93

locales recommends no packages.

locales suggests no packages.

-- debconf information:
* locales/default_environment_locale: en_US.UTF-8
* locales/locales_to_be_generated: All locales


Reply to: