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>
Sat, 25 Sep 2021 20:01:17 +0000 (21:01 +0100)
commitc18dda342002d95e9d69adac1f5471ad0d9e6a2c
tree68cfe1e64486d0926999842e9f58b6c16e36a521
parente5f5e068f6ff09c5cecbe78c354130b0c8700923
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