From 0d30deac7fc4ac8378f8586c61d897809433019e Mon Sep 17 00:00:00 2001 From: Carlos Nihelton Date: Tue, 18 Jan 2022 10:18:45 -0300 Subject: [PATCH] Promotes the "--no-checks" to outside of dry-run Tests in real WSL2 environment revealed that update-locale checks fails but with the "--no-checks" option it updates the locale files accordingly and when the image restarts the locale is correctly set. --- system_setup/server/controllers/configure.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system_setup/server/controllers/configure.py b/system_setup/server/controllers/configure.py index ea437a55..1cf00b16 100644 --- a/system_setup/server/controllers/configure.py +++ b/system_setup/server/controllers/configure.py @@ -85,7 +85,8 @@ class ConfigureController(SubiquityController): def __update_locale_cmd(self, lang) -> List[str]: """ Add mocking cli to update-locale if in dry-run.""" - updateLocCmd = ["update-locale", "LANG={}".format(lang)] + updateLocCmd = ["update-locale", "LANG={}".format(lang), + "--no-checks"] if not self.app.opts.dry_run: return updateLocCmd @@ -93,8 +94,7 @@ class ConfigureController(SubiquityController): "etc/default/") os.makedirs(defaultLocDir, exist_ok=True) updateLocCmd += ["--locale-file", - os.path.join(defaultLocDir, "locale"), - "--no-checks"] + os.path.join(defaultLocDir, "locale")] return updateLocCmd async def _activate_locale(self, lang, env) -> bool: