commit: 511e9f5e4580dfe73f2bc02db9f0fef799af7ac5 Author: Kerin Millar <kfm <AT> plushkava <DOT> net> AuthorDate: Tue Oct 28 01:57:23 2025 +0000 Commit: Kerin Millar <kfm <AT> plushkava <DOT> net> CommitDate: Tue Oct 28 02:07:25 2025 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=511e9f5e
Issue guidance tailored to either of systemd or openrc Have the check_effective_locale() subroutine communicate exactly which utility the user ought to run for the purpose of choosing - and effecting - a different locale. Bug: https://bugs.gentoo.org/963974 Suggested-by: Sam James <sam <AT> gentoo.org> Signed-off-by: Kerin Millar <kfm <AT> plushkava.net> locale-gen | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/locale-gen b/locale-gen index 00ddb7b..0a891f5 100644 --- a/locale-gen +++ b/locale-gen @@ -597,7 +597,15 @@ sub check_effective_locale ($supported_by) { return; } elsif (exists $supported_by->{$locale}) { print_warning("WARNING! An ambiguous locale is currently in effect: $locale\n"); - print_warning("It is strongly recommended to choose another with eselect(1) or localectl(1).\n"); + my $utility; + if (-d '/run/systemd') { + $utility = 'localectl'; + } elsif (-d '/run/openrc') { + $utility = 'eselect'; + } + if (defined $utility) { + print_warning("It is strongly recommended to choose another with the ${utility}(1) utility.\n"); + } } }
