[PR #9238/6bb7a1cc backport][stable-10] locale_gen: fix/improvements #9481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:Refer to #9131 (comment) for a more complete rationale.
Change the logic to determine whether
ubuntu_mode
isTrue
orFalse
.Formerly it would:
ubuntu_mode=True
if/var/lib/locales/supported.d
existed,False
if/etc/locale.gen
exists,With this PR it will:
ubuntu_mode=False
is/etc/locale.gen
is present,True
if the/var/lib/...
directory exists,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
COMPONENT NAME
locale_gen