From 4ce68ea9b3707fde8c4be20e164fc2a41197fdda Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 14 Jun 2022 09:13:00 +0900 Subject: [PATCH] test: install C.UTF-8 and English locales --- test/test-functions | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/test-functions b/test/test-functions index 65d14df8c8..7584bda45a 100644 --- a/test/test-functions +++ b/test/test-functions @@ -702,6 +702,7 @@ setup_basic_environment() { install_pam install_dbus install_fonts + install_locales install_keymaps install_x11_keymaps install_terminfo @@ -1916,6 +1917,29 @@ install_pam() { done } +install_locales() { + # install only C.UTF-8 and English locales + dinfo "Install locales" + + if command -v meson >/dev/null \ + && (meson configure "${BUILD_DIR:?}" | grep 'localegen-path */') \ + || get_bool "$LOOKS_LIKE_DEBIAN"; then + # locale-gen support + image_install -o locale-gen localedef + inst /etc/locale.gen || : + inst /usr/share/i18n/SUPPORTED || : + inst_recursive /usr/share/i18n/charmaps + inst_recursive /usr/share/i18n/locales + inst_recursive /usr/share/locale/en + inst_recursive /usr/share/locale/en_* + fi + + inst_recursive /usr/lib/locale/C.utf8 + inst_recursive /usr/lib/locale/C.UTF-8 + inst_recursive /usr/lib/locale/en_*.utf8 + inst_recursive /usr/lib/locale/en_*.UTF-8 +} + # shellcheck disable=SC2120 install_keymaps() { local i p