fix: set_locale on debian 13#68426
Conversation
twangboy
left a comment
There was a problem hiding this comment.
This needs a changelog and a test.
| # localectl on SLE12 is installed but the integration is broken -- config is rewritten by YaST2 | ||
| __grains__["os_family"] in ["Suse"] and __grains__["osmajorrelease"] in [12] | ||
| # starting from Debian 13, update-locale must be used instead of localectl set-locale | ||
| or __grains__["os_family"] in ["Debian"] and __grains__["osmajorrelease"] >= 13 |
There was a problem hiding this comment.
I don't think this needs to be done conditionally for versions >= 13. I think update-locale can just be used for all versions of Debian.
There was a problem hiding this comment.
It worked until debian 13. I guess we should not try to fix something that is not broken.
There was a problem hiding this comment.
Possibly, but it adds more special cases and makes code harder to follow and maintain. According to all the research I have done, the way to set the default locale non-interactively on Debian is to use update-locale on all versions. I could not find any documentation on the Debian wikis, man pages, etc prescribing the use of localctl set-locale.
There was a problem hiding this comment.
If we add a test we can know for sure.
twangboy
left a comment
There was a problem hiding this comment.
This will also need a changelog and a test
On Debian 13 (Trixie) and later, localectl set-locale is no longer supported. Fall back to update-locale instead. Targets only os == "Debian" (not os_family) to avoid regressing Ubuntu. Fixes #68425 Implements #68426 Co-authored-by: gpernot-celeste <gpernot-celeste@users.noreply.github.com> Agent-Logs-Url: https://github.com/saltstack/salt/sessions/0ea6fd9a-3e09-42cf-be2d-af077703908c Co-authored-by: dwoz <1527763+dwoz@users.noreply.github.com>
Fixes #68425
What does this PR do?
Add a special case for Debian >= 13 with systemd : localectl set-local is not supported anymore.
Fall back to update-locale