localed: Run locale-gen if available to generate missing locale
authorMatthias Klumpp <matthias@tenstral.net>
Fri, 8 Jan 2021 22:59:38 +0000 (23:59 +0100)
committerMichael Biebl <biebl@debian.org>
Sun, 7 Aug 2022 13:25:09 +0000 (14:25 +0100)
commit378bbdcc6faf2ec8945339882543b84cbc85e491
tree42365b2d96b350c597918765c52cb7b8f0d11533
parent16d52054adb2d489ee2882117d0d765b4f4820fc
localed: Run locale-gen if available to generate missing locale

This change improves integration with distributions using locale-gen to
generate missing locale on-demand, like Debian-based distributions
(Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.
We only ever enable new locales for generation, and never disable them.
Furthermore, we only generate UTF-8 locale.

This feature is only used if explicitly enabled at compile-time, and
will also be inert at runtime if the locale-gen binary is missing.

(cherry picked from commit 8f20232fcb52dbe6255f3df6101fc057af90bcfa)

Gbp-Pq: Name localed-Run-locale-gen-if-available-to-generate-missing-l.patch
meson.build
meson_options.txt
src/locale/keymap-util.c
src/locale/keymap-util.h
src/locale/localectl.c
src/locale/localed.c