commit:     0e665ee42d74e954b849e5a0e2363f851dc309ef
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Oct 28 01:46:10 2025 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Tue Oct 28 01:46:10 2025 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=0e665ee4

Only check the effective locale for a --prefix of "/"

Otherwise, the guidance issued won't necessarily be applicable.

Bug: https://bugs.gentoo.org/963974
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 locale-gen | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/locale-gen b/locale-gen
index 3253d02..00ddb7b 100644
--- a/locale-gen
+++ b/locale-gen
@@ -124,17 +124,17 @@ umask 0022;
        };
 
        # Install the new locale archive.
-       my $size = do {
-               my $may_reset_labels = $prefix eq '' || $prefix eq '/';
-               install_archive($src_path, $dst_path, $may_reset_labels);
-       };
+       my $is_prefixed = $prefix ne '' && $prefix ne '/';
+       my $size = install_archive($src_path, $dst_path, ! $is_prefixed);
 
        my $total = scalar @locales + scalar %installed_by;
        printf "Successfully installed an archive containing %d locale%s, of %s 
MiB in size.\n",
                $total, plural($total), round($size / 2 ** 20);
 
        # Issue a warning if the effective locale does not specify a charmap.
-       check_effective_locale($supported_by);
+       if (! $is_prefixed) {
+               check_effective_locale($supported_by);
+       }
 }
 
 sub get_locale_dir () {

Reply via email to