|
|
2aacef |
From ea8b80cdc0dfd0ad92301a0e421df4d3110fe09c Mon Sep 17 00:00:00 2001
|
|
|
2aacef |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
2aacef |
Date: Mon, 7 Nov 2022 11:57:59 +0100
|
|
|
2aacef |
Subject: [PATCH] test: fix locale installation when locale-gen is used
|
|
|
2aacef |
|
|
|
2aacef |
locale-gen might merge all compiled locales into a simple archive, so we
|
|
|
2aacef |
need to install it as well if necessary.
|
|
|
2aacef |
|
|
|
2aacef |
(cherry picked from commit 0c416ea01bc14adff10f4fc5415a36bd2d48f604)
|
|
|
2aacef |
|
|
|
2aacef |
Related #2138081
|
|
|
2aacef |
---
|
|
|
2aacef |
test/test-functions | 19 ++++++++++++-------
|
|
|
2aacef |
1 file changed, 12 insertions(+), 7 deletions(-)
|
|
|
2aacef |
|
|
|
2aacef |
diff --git a/test/test-functions b/test/test-functions
|
|
|
2aacef |
index 80ce383e64..45ca472916 100644
|
|
|
2aacef |
--- a/test/test-functions
|
|
|
2aacef |
+++ b/test/test-functions
|
|
|
2aacef |
@@ -1988,14 +1988,19 @@ install_locales() {
|
|
|
2aacef |
inst /usr/share/i18n/SUPPORTED || :
|
|
|
2aacef |
inst_recursive /usr/share/i18n/charmaps
|
|
|
2aacef |
inst_recursive /usr/share/i18n/locales
|
|
|
2aacef |
- inst_recursive /usr/share/locale/en
|
|
|
2aacef |
- inst_recursive /usr/share/locale/en_*
|
|
|
2aacef |
+ inst_recursive /usr/share/locale/en*
|
|
|
2aacef |
+ inst_recursive /usr/share/locale/de*
|
|
|
2aacef |
+ image_install /usr/share/locale/locale.alias
|
|
|
2aacef |
+ # locale-gen might either generate each locale separately or merge them
|
|
|
2aacef |
+ # into a single archive
|
|
|
2aacef |
+ if ! (inst_recursive /usr/lib/locale/C.*8 /usr/lib/locale/en_*8 ||
|
|
|
2aacef |
+ image_install /usr/lib/locale/locale-archive); then
|
|
|
2aacef |
+ dfatal "Failed to install required locales"
|
|
|
2aacef |
+ exit 1
|
|
|
2aacef |
+ fi
|
|
|
2aacef |
+ else
|
|
|
2aacef |
+ inst_recursive /usr/lib/locale/C.*8 /usr/lib/locale/en_*8
|
|
|
2aacef |
fi
|
|
|
2aacef |
-
|
|
|
2aacef |
- inst_recursive /usr/lib/locale/C.utf8
|
|
|
2aacef |
- inst_recursive /usr/lib/locale/C.UTF-8
|
|
|
2aacef |
- inst_recursive /usr/lib/locale/en_*.utf8
|
|
|
2aacef |
- inst_recursive /usr/lib/locale/en_*.UTF-8
|
|
|
2aacef |
}
|
|
|
2aacef |
|
|
|
2aacef |
# shellcheck disable=SC2120
|