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

Bug#271526: Problem with locale.gen during updating package locales



Package: locales
Version: 2.3.2.ds1-20
Followup-For: Bug #271526


When I updated my sarge system today it also wanted to update the
locales. But during installation it seemed to have some sort of infinite
loop generating de_DE@euro in ISO-8859-15, so I aborted it with Ctrl-C 
(all of the installations) and checked the debian bug reports for this.

>From the replies of the original bug report I found that there seems to
be a problem with the /etc/locale.gen file, which I checked immediately
and found some 800 lines of 
de_DE@euro ISO-8859-15
at the bottom of the file. I hadn't touched this file for months, but I
can't remember when I did my last update that updated this package that
wasn't overnight (so I had a chance to see this bug...)
I then deleted nearly all of the duplicate lines in /etc/locale.conf, so
it only looked like

----
[...]
# does read in your changes.

de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE@euro ISO-8859-15
### BEGIN DEBCONF SECTION FOR localeconf
# Do not edit within this region if you want your changes to be
# preserved
# by debconf.  Instead, make changes before the "### BEGIN DEBCONF
# SECTION
# FOR localeconf" line, and/or after the "### END DEBCONF SECTION FOR
# localeconf" line.
### END DEBCONF SECTION FOR localeconf

de_DE@euro ISO-8859-15

----
the omitted header being the note about changing by hand versus
dpkg-reconfigure locales.

Yes, I know I had 2 times the de_DE@euro line in it, but I didn't
thought that could be problematic.

When I restarted "dpkg --configure -a" it seemed that locales again
wanted to go in its loop, so I aborted after the third 
"de_DE.ISO-8859-15.euro ...done" line. After another try I Ctrl-C'ed
again and looked at the locale.gen file whose last lines now looked like 

---
[...]
### END DEBCONF SECTION FOR localeconf

de_DE@euro ISO-8859-15

de_DE@euro ISO-8859-15
de_DE@euro ISO-8859-15

de_DE@euro ISO-8859-15
de_DE@euro ISO-8859-15
de_DE@euro ISO-8859-15
de_DE@euro ISO-8859-15

---

You probably notice that the lines are seperated in blocks of 1, 2 and
4. Please don't forget the one line of this locale setting immediately 
before the DEBCONF SECTION.
My explanation is that some file during upgrade or when aborting it
(???) looks at the locale.gen and adds as much of theses lines at 
the end as it could find before. So in the first run it found 2 
lines (one before, one after DEBCONF SECTION, in the second run 
it found 4.

The next time I let this run through and rightly it stopped after the
appropriate amount of generating it (8x, IIRC).

Perhaps there should be some script during upgrade that checks for
double lines in this file and removes them?

One thing to add: One bug report wrote that his locale.gen was the "old
style", not the "new" (with the "# XXX GENERATED XXX" line). I have the
newer version.

dpkg-reconfigure locales after successful upgrade didn't remove the
duplicate lines, but that was somewhat expected since these lines are
outside the DEBCONF SECTION. Interestingly it added only the 
de_DE@euro ISO-8859-15
line to this section, although I told it to generate three locales (the
three before the DEBCONF SECTION, these were already marked when
starting it).

Hoping that the above makes some sense
  Philipp


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15) (ignored: LC_ALL set to de_DE@euro)

Versions of packages locales depends on:
ii  debconf                     1.4.30.11    Debian configuration management sy
ii  libc6 [glibc-2.3.2.ds1-20]  2.3.2.ds1-20 GNU C Library: Shared libraries an

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



Reply to: