]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ubuntu/debian: Set up locale correctly on Debian/Ubuntu
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 13 Apr 2022 09:08:03 +0000 (11:08 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 19 Apr 2022 07:09:12 +0000 (09:09 +0200)
Let's make sure we configure the locale. Also, some programs
expect /etc/default/locale to exist on Ubuntu/Debian so let's
create a symlink from there to /etc/locale.conf as well.

mkosi/__init__.py

index 3e343e4716b64c4272fc7d85b9495aae4392d3aa..552d1353267a5b5b486baf4aca576fc5d474870c 100644 (file)
@@ -2817,6 +2817,9 @@ def install_debian_or_ubuntu(args: MkosiArgs, root: Path, *, do_run_build_script
         for kver, kimg in gen_kernel_images(args, root):
             run_workspace_command(args, root, ["kernel-install", "add", kver, Path("/") / kimg])
 
+    root.joinpath("etc/locale.conf").write_text("LANG=C.UTF-8\n")
+    root.joinpath("etc/default/locale").symlink_to("/etc/locale.conf")
+
 
 @complete_step("Installing Debian…")
 def install_debian(args: MkosiArgs, root: Path, do_run_build_script: bool) -> None: