From 90b9785964e508fa49babdaf863441134ae6e7d9 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 20 Apr 2022 20:08:24 +0200 Subject: [PATCH] mkosi: Force /etc/default/locale to be a symlink to locale.conf If the locales package is installed, /etc/default/locale will exist in the filesystem already. Let's make sure we handle that properly. --- mkosi/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 5d1ce87ca..e4a370924 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2836,6 +2836,10 @@ def install_debian_or_ubuntu(args: MkosiArgs, root: Path, *, do_run_build_script run_workspace_command(args, root, ["kernel-install", "add", kver, Path("/") / kimg]) root.joinpath("etc/locale.conf").write_text("LANG=C.UTF-8\n") + try: + root.joinpath("etc/default/locale").unlink() + except FileNotFoundError: + pass root.joinpath("etc/default/locale").symlink_to("/etc/locale.conf") -- 2.47.2