diff options
author | Christopher Larson <kergoth@gmail.com> | 2012-04-26 23:03:55 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-03 15:00:26 +0100 |
commit | 3f36058923ccda25a3dd85046542e65b6034c09e (patch) | |
tree | ab705ccfbe762d42fe18d44c27d6037f433b85cf /meta/files/common-licenses/OGTSL | |
parent | 7808c7ee9277170fbfb22bcf0575285174c2718a (diff) | |
download | openembedded-core-3f36058923ccda25a3dd85046542e65b6034c09e.tar.gz openembedded-core-3f36058923ccda25a3dd85046542e65b6034c09e.tar.bz2 openembedded-core-3f36058923ccda25a3dd85046542e65b6034c09e.tar.xz openembedded-core-3f36058923ccda25a3dd85046542e65b6034c09e.zip |
libc-package: rework ''precompiled' locale handling
There were a couple problems with the handling of precompiled locales.
- it gathered the list of locales from the directories - this breaks due to
the naming mismatch, e.g. en_US.UTF-8 vs en_US.utf8.
- it retained its hardcoded assumption that the non-suffixed locale (en_US, as
opposed to en_US.*) is UTF-8, while the others are otherwise. Hardcoding
this is both inflexible and just plain wrong for some toolchains. It's most
common in desktop distros for 'en_US' to be non-utf8, and ''en_US.UTF-8' is
utf8, and this is the case in some external toolchains as well.
The code now uses the SUPPORTED file to hold the knowledge it needs. This file
not only holds the list of locales to generate, but also maps the locale names
to the charsets they correspond to. The code now uses this to assemble its
charset map, falling back to the '.' suffix as charset when the locale is not
in the map. For precompiled, it now uses the locale->charset knowledge it has,
thereby allowing non-utf8 non-suffixed locale names, whereas for
non-precompiled, it reverts to the previous assumption, renaming the utf8
locale and forcibly suffixing the others.
So, a person maintaining an external toolchain recipe is responsible for
ensuring that the SUPPORTED file they provide matches up with the compiled
locales in the toolchain, if they want to utilize precompiled locales.
I believe in the long term the compiled case should do the same thing
precompiled does, and use SUPPORTED or a similar mechanism to encode the
knowledge, and if people want all the non-suffixed names to be utf8, they can
change that file to do so. This would avoid the hardcoded assumption in the
code, as well as consolidating the behavior between the compiled and
precompiled cases.
Signed-off-by: Christopher Larson <kergoth@gmail.com>
Diffstat (limited to 'meta/files/common-licenses/OGTSL')
0 files changed, 0 insertions, 0 deletions