Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #9238/6bb7a1cc backport][stable-10] locale_gen: fix/improvements #9481

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Dec 30, 2024

This is a backport of PR #9238 as merged into main (6bb7a1c).

SUMMARY

It introduces a RV mechanism that declares the mode in a more descriptive way:

ubuntu_mode mechanism
False glibc
True debian

Refer to #9131 (comment) for a more complete rationale.

Change the logic to determine whether ubuntu_mode is True or False.

Formerly it would:

  1. set ubuntu_mode=True if /var/lib/locales/supported.d existed,
  2. else False if /etc/locale.gen exists,
  3. else raising an error.

With this PR it will:

  1. set ubuntu_mode=False is /etc/locale.gen is present,
  2. else True if the /var/lib/... directory exists,
  3. else error.

Canonical made a deliberate decision to move towards the glibc support, so all Ubuntu versions since 16.04 have /etc/locale.gen. I have tested locally in Debian 11 and 12 and both of them worked using glibc mode.

The PR will include tests forcing ubuntu_mode=True.

Fixes #8487 #9131

ISSUE TYPE
  • Bugfix Pull Request
  • Refactoring Pull Request
COMPONENT NAME

locale_gen

* locale_gen: fix/improvements

* fix sanity

* add RV doc

* add integration test forcing mechanism=debian

- test is failing

* fix RETURN doc

* reformat yaml

* comment out the test for ubuntu_mode=True

* multiple changes:

- add changelog fragment
- improved docs

* normalize docs after rebasing

* Update changelogs/fragments/9131-locale-gen-rewrite.yml

* apply recommendations from review

* Update plugins/modules/locale_gen.py

Co-authored-by: Felix Fontein <[email protected]>

* Update changelogs/fragments/9238-locale-gen-rewrite.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/locale_gen.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/locale_gen.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 6bb7a1c)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug integration tests/integration module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Dec 30, 2024
@felixfontein felixfontein merged commit ec9b1fc into stable-10 Dec 30, 2024
129 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-10/6bb7a1cc735eb7f7ca1907d5a3cc0797ff7fa8f2/pr-9238 branch December 30, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug This issue/PR relates to a bug integration tests/integration module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants