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

locale_gen: fix/improvements #9238

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Dec 12, 2024

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

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added WIP Work in progress bug This issue/PR relates to a bug module module plugins plugin (any type) labels Dec 12, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch labels Dec 14, 2024
@ansibullbot

This comment was marked as resolved.

@ansibullbot ansibullbot added integration tests/integration tests tests labels Dec 16, 2024
@ansibullbot

This comment was marked as resolved.

@russoz russoz force-pushed the locale-gen-rewrite branch from 0bff56e to 2840fd3 Compare December 16, 2024 03:46
@ansibullbot

This comment was marked as resolved.

@russoz russoz changed the title [WIP] locale_gen: fix/improvements locale_gen: fix/improvements Dec 23, 2024
@russoz russoz requested a review from felixfontein December 23, 2024 02:52
@russoz
Copy link
Collaborator Author

russoz commented Dec 23, 2024

Hi @ltog @samikhelil83 @lukasz-zaroda

Could you please review the PR? Thanks in advance!

Happy holidays!

@ansibullbot ansibullbot removed the WIP Work in progress label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. integration tests/integration module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

locale_gen Don't do anything
3 participants