cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #03091
Re: [Merge] ~raharper/cloud-init:default-lang-c-utf8 into cloud-init:master
Diff comments:
> diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
> index abfb81f..b2904e8 100644
> --- a/cloudinit/distros/debian.py
> +++ b/cloudinit/distros/debian.py
> @@ -246,9 +250,17 @@ def apply_locale(locale, sys_path=LOCALE_CONF_FN, keyname='LANG'):
> keyname, sys_val, locale)
> return
>
> - util.subp(['locale-gen', locale], capture=False)
> + # Update system configuration (not found, or not the same)
> util.subp(
> ['update-locale', '--locale-file=' + sys_path,
> '%s=%s' % (keyname, locale)], capture=False)
>
> + # special case for C.UTF-8, it does not need to be regenerated
> + if locale.lower() == 'c.utf-8':
One can't regenerate the C.UTF-8 locale, but we could check for the dir and warn if it's not present.
> + return
> +
> + # finally, trigger regeneration
> + util.subp(['locale-gen', locale], capture=False)
> +
> +
> # vi: ts=4 expandtab
--
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/329152
Your team cloud-init commiters is requested to review the proposed merge of ~raharper/cloud-init:default-lang-c-utf8 into cloud-init:master.
References