Skip to content

Conversation

@gpernot-celeste
Copy link

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

@gpernot-celeste gpernot-celeste requested a review from a team as a code owner October 23, 2025 13:08
@twangboy twangboy added the test:full Run the full test suite label Oct 31, 2025
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a changelog and a test.

@twangboy twangboy added this to the Sulfur v3006.17 milestone Oct 31, 2025
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked until debian 13. I guess we should not try to fix something that is not broken.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also need a changelog and a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: on debian >= 13 set_locale should use debian's update-locale

3 participants