locales 2.27-3ubuntu1.4 enabled random locales

Bug #1908928 reported by Avamander
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

The installation of locales 2.27-3ubuntu1.4 enabled random locales. This is annoying.

apt output:

```
Generating locales (this might take a while)...
  bg_BG.CP1251... done
  bg_BG.UTF-8... done
  cs_CZ.ISO-8859-2... done
  cs_CZ.UTF-8... done
  de_DE.ISO-8859-1... done
  de_DE.UTF-8... done
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
  es_ES.ISO-8859-1... done
  es_ES.UTF-8... done
  et_EE.UTF-8... done
  fr_FR.ISO-8859-1... done
  fr_FR.UTF-8... done
  it_IT.ISO-8859-1... done
  it_IT.UTF-8... done
  ja_JP.UTF-8... done
  ko_KR.UTF-8... done
  pl_PL.ISO-8859-2... done
  pl_PL.UTF-8... done
  pt_PT.ISO-8859-1... done
  pt_PT.UTF-8... done
  ru_RU.ISO-8859-5... done
  ru_RU.UTF-8... done
  zh_CN.GB2312... done
  zh_CN.UTF-8... done
  zh_TW.BIG5... done
  zh_TW.UTF-8... done
Generation complete.
```

Most of these locales were NOT previously enabled.

Tags: bionic
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Please show us the output of these terminal commands:

grep -vE '^(#|$)' /etc/locale.gen

cat /var/lib/locales/supported.d/*

affects: langpack-locales (Ubuntu) → glibc (Ubuntu)
Changed in glibc (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Avamander (avamander) wrote :

# grep -vE '^(#|$)' /etc/locale.gen
> bg_BG CP1251
> bg_BG.UTF-8 UTF-8
> cs_CZ ISO-8859-2
> cs_CZ.UTF-8 UTF-8
> de_DE ISO-8859-1
> de_DE.UTF-8 UTF-8
> en_US ISO-8859-1
> en_US.UTF-8 UTF-8
> es_ES ISO-8859-1
> es_ES.UTF-8 UTF-8
> et_EE.UTF-8 UTF-8
> fr_FR ISO-8859-1
> fr_FR.UTF-8 UTF-8
> it_IT ISO-8859-1
> it_IT.UTF-8 UTF-8
> ja_JP.UTF-8 UTF-8
> ko_KR.UTF-8 UTF-8
> pl_PL ISO-8859-2
> pl_PL.UTF-8 UTF-8
> pt_PT ISO-8859-1
> pt_PT.UTF-8 UTF-8
> ru_RU ISO-8859-5
> ru_RU.UTF-8 UTF-8
> zh_CN GB2312
> zh_CN.UTF-8 UTF-8
> zh_TW BIG5
> zh_TW.UTF-8 UTF-8

# cat /var/lib/locales/supported.d/*
> zsh: no matches found: /var/lib/locales/supported.d/*

Keep in mind I had only "en_US.UTF-8" and "et_EE.UTF-8" enabled, suddenly the rest were added.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Given the contents of /etc/locale.gen, generating those locales when updating the locales package (or e.g. running "sudo locale-gen") is expected behavior. Are you claiming that Ubuntu somehow uncommented those locales in /etc/locale.gen without your knowledge?

Revision history for this message
Avamander (avamander) wrote :

> Are you claiming that Ubuntu somehow uncommented those locales in /etc/locale.gen without your knowledge?

Yes, the first thing I do on new installs is only leave the two previously mentioned locales uncommented. Always. I get annoyed waiting for unused locales to be generated.

On this specific machine I've seen numerous locale-gen runs and this is the first I saw where these new ones appeared.

I will post more information tomorrow, like dpkg.log of the last few days.

Revision history for this message
Balint Reczey (rbalint) wrote :

Please use:
 dpkg-reconfigure locales

to set which locales to regenerate.

Changed in glibc (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Avamander (avamander) wrote :

That configuration was already done. Package upgrade changed it.

Changed in glibc (Ubuntu):
status: Invalid → New
Revision history for this message
Avamander (avamander) wrote :
Download full text (18.5 KiB)

@gunnarhj

> I meant to ask which package updates result in generation of new locales.

One of these, but locale/libc is the only one really related to this functionality:

dpkg.log.2.gz:2020-12-21 18:41:36 startup archives unpack
dpkg.log.2.gz:2020-12-21 18:41:38 upgrade libc6-i386:amd64 2.27-3ubuntu1.3 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:38 status triggers-pending libc-bin:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:38 status half-configured libc6-i386:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:38 status unpacked libc6-i386:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:38 status half-installed libc6-i386:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:39 status half-installed libc6-i386:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:39 status unpacked libc6-i386:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:39 status unpacked libc6-i386:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:39 upgrade libc6-dev:amd64 2.27-3ubuntu1.3 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:39 status half-configured libc6-dev:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:39 status unpacked libc6-dev:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:39 status half-installed libc6-dev:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:40 status half-installed libc6-dev:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:40 status unpacked libc6-dev:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:40 status unpacked libc6-dev:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:40 upgrade libc-dev-bin:amd64 2.27-3ubuntu1.3 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:40 status half-configured libc-dev-bin:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:40 status unpacked libc-dev-bin:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:40 status half-installed libc-dev-bin:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:40 status triggers-pending man-db:amd64 2.8.3-2ubuntu0.1
dpkg.log.2.gz:2020-12-21 18:41:41 status half-installed libc-dev-bin:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:41 status unpacked libc-dev-bin:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:41 status unpacked libc-dev-bin:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:41 upgrade libc6:amd64 2.27-3ubuntu1.3 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:41 status half-configured libc6:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:41 status unpacked libc6:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:41 status half-installed libc6:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:42 status half-installed libc6:amd64 2.27-3ubuntu1.3
dpkg.log.2.gz:2020-12-21 18:41:42 status unpacked libc6:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:42 status unpacked libc6:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:42 startup packages configure
dpkg.log.2.gz:2020-12-21 18:41:42 configure libc6:amd64 2.27-3ubuntu1.4 <none>
dpkg.log.2.gz:2020-12-21 18:41:42 status unpacked libc6:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:42 status unpacked libc6:amd64 2.27-3ubuntu1.4
dpkg.log.2.gz:2020-12-21 18:41:42 status half-configured libc6:amd64 2.27-3ubuntu1.4
dpkg.lo...

Revision history for this message
Avamander (avamander) wrote :

locale.gen was last modified in 11-03-2019 before these updates were applied. Some package amongst those decided to enable 25 new locales.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The entries in comment #7, from some attempt to upgrade glibc, might be the result of your disabling of write access to some files (something you should obviously not do).

The only packages I'm aware of, which cause additional locales to be generated during install, are Ubuntu's language packs. What's the output for you of this command:

dpkg -l | grep -E 'language-pack-\w+-base'

Revision history for this message
Avamander (avamander) wrote :

At that point, no permissions were changed because no such issue had occured.

Revision history for this message
Avamander (avamander) wrote :

# dpkg -l | grep -E 'language-pack-\w+-base'

#

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2021-02-01 20:26, Avamander wrote:
> At that point, no permissions were changed because no such issue
> had occured.

I see.

> # dpkg -l | grep -E 'language-pack-\w+-base'
>
> #

So no language packs. I'm lost.

Probably you need to show how the issue can be reproduced, or else it will be hard for anyone to address it.

Revision history for this message
Avamander (avamander) wrote :

I ran an upgrade from 18.04 to 20.04 and it generated these locales:

```
Generating locales (this might take a while)...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IL.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
  et_EE.UTF-8... done
Generation complete.
```

While only `et_EE.UTF-8`, `en_GB.UTF-8` and `en_US.UTF-8` were enabled.

This is `/var/lib/locales/supported.d/en` after the release upgrade:
```
en_HK.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_IN UTF-8
en_IL UTF-8
en_ZM UTF-8
en_ZW.UTF-8 UTF-8
en_NZ.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_NG UTF-8
en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_AU.UTF-8 UTF-8
en_SG.UTF-8 UTF-8
en_BW.UTF-8 UTF-8
en_AG UTF-8
en_ZA.UTF-8 UTF-8
en_CA.UTF-8 UTF-8
en_IE.UTF-8 UTF-8
```

I think the locale package is still overriding user wishes and some installation script is generating files it should not.

Revision history for this message
Avamander (avamander) wrote :

The upgrade was done on a totally pristine Kubuntu 18.04 install that didn't have anything out-of-standard installed. So it's a package in the default repositories.

I think I'm not the only one who has noticed these anomalies either (an AskUbuntu thread that's 2mo old): https://askubuntu.com/questions/1301908/locale-gen-generates-not-selected-locales

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

/var/lib/locales/supported.d/en belongs to the language-pack-en-base package, so you seem to have the English language packs installed, which makes it expected behavior.

Avamander (avamander)
Changed in glibc (Ubuntu):
status: New → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.