salt icon indicating copy to clipboard operation
salt copied to clipboard

locale.present not working in Ubuntu 14.04

Open eyj opened this issue 10 years ago • 0 comments

Salt Tag: v2015.8.6

On Ubuntu 14.04, locale-gen returns an error if it is passed a charmap as part of the locale: [INFO ] Executing command ['locale-gen', 'de_DE.UTF-8 UTF-8'] in directory '/home/ubuntu' [ERROR ] Command ['locale-gen', 'de_DE.UTF-8 UTF-8'] failed with return code: 1

I therefore propose to pass salt.utils.locales.normalize_locale(locale) to locale-gen instead of just locale.

Does anyone know how this should be handled for other linux flavors? On debian, any parameter to locale-gen is just ignored; gentoo is already handled separately.

I'll post a PR later, probably I'll just qualify it with 'if os_ubuntu'.

eyj avatar Feb 15 '16 09:02 eyj