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