mkarchroot: generate and use C.UTF-8 by default

systemd >= 251 is forcing nspawns to use LANG=C.UTF-8:
b626f6959b

It makes sense to generate the C.UTF-8 locate here when using it as the
default LANG value.

Related to: https://bugs.archlinux.org/task/74864
This commit is contained in:
Felix Yan 2022-05-27 02:45:06 +00:00 committed by Levente Polyak
parent 0c61761f33
commit 5e98478344
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ done
unshare --mount pacstrap -${umode}Mcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
printf '%s.UTF-8 UTF-8\n' C en_US de_DE > "$working_dir/etc/locale.gen"
echo 'LANG=C.UTF-8' > "$working_dir/etc/locale.conf"
echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"
systemd-machine-id-setup --root="$working_dir"