1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

test: fix locale installation when locale-gen is used

locale-gen might merge all compiled locales into a simple archive, so we
need to install it as well if necessary.
This commit is contained in:
Frantisek Sumsal 2022-11-07 11:57:59 +01:00
parent eb5d7730e1
commit 0c416ea01b

View File

@ -1988,14 +1988,19 @@ install_locales() {
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_*
inst_recursive /usr/share/locale/en*
inst_recursive /usr/share/locale/de*
image_install /usr/share/locale/locale.alias
# locale-gen might either generate each locale separately or merge them
# into a single archive
if ! (inst_recursive /usr/lib/locale/C.*8 /usr/lib/locale/en_*8 ||
image_install /usr/lib/locale/locale-archive); then
dfatal "Failed to install required locales"
exit 1
fi
else
inst_recursive /usr/lib/locale/C.*8 /usr/lib/locale/en_*8
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