#965323 postinst script deletes custom locales

Package:
locales
Source:
glibc
Submitter:
Harald Dunkel
Date:
2022-04-11 14:03:03 UTC
Severity:
normal
Tags:
#965323#5
Date:
2020-07-19 13:55:29 UTC
From:
To:
To support MacOS terminal I have to define "UTF-8" using localedef (see #952516).
Problem is, custom locales are wiped out by the postinst script. Sample:

# locale -a
C
C.UTF-8
POSIX
# localedef -i C -f UTF-8 UTF-8
# locale -a
C
C.UTF-8
POSIX
UTF-8
UTF-8.utf8
# apt reinstall locales
:
:
# locale -a
C
C.UTF-8
POSIX

See UTF-8 is gone? Shouldn't happen.

Same for locales 2.31-1.


Harri

#965323#10
Date:
2020-07-19 16:27:59 UTC
From:
To:
control: tag -1 + wontfix

Yes, that's normal. locales might not be compatible with the new glibc
version, so all of them are removed and regenerated on upgrade.
Otherwise you might end up with broken locales causing issues.

#965323#17
Date:
2020-07-27 06:26:27 UTC
From:
To:
Can't be worse than not having the locale at all. Not to mention that there is
an option --posix to assure compatibility to POSIX.1-2008, AFAICT. If there are
incompatible changes, then its my job to worry about recreating the custom locales.

Since the postinst builds just a subset of all locales and since it even maintains
a list about it, I would suggest to erase and rebuild only these locales.

Thanx very much
Harri

#965323#22
Date:
2020-07-29 10:35:58 UTC
From:
To:
This option doesn't change the output format which is glibc specific. It
only control the source format, which is defined by POSIX.

This is how *you* consider that. Most users that encounter broken
locales just report a bug.

This is not so easy as the list evolve from version to version.

Regards
Aurelien

#965323#27
Date:
2022-04-11 13:52:22 UTC
From:
To:
How can I get out of this? What do you suggest? Are the tools to
create custom locales included in the Debian package by accident?

Harri