commit: 545e4af5d2b50214998351268d2ba4844e9c48af
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Aug 20 02:34:26 2025 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Wed Aug 20 02:36:01 2025 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=545e4af5
Support charmaps compressed with bzip2
Character map files may be uncompressed, compressed with gzip, or
compressed with bzip2. Revise the get_valid_charmaps() subroutine so
that it is able to handle the latter case.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locale-gen b/locale-gen
index 3f21196..8d9fc94 100755
--- a/locale-gen
+++ b/locale-gen
@@ -323,7 +323,7 @@ sub get_valid_charmaps ($prefix) {
my $top = catdir($prefix, '/usr/share/i18n/charmaps');
if (! opendir my $dh, $top) {
die "$PROGRAM: Can't open '$top' for reading: $!\n";
- } elsif (! (my @names = map +( -f "$top/$_" ? s/\.gz\z//r : () ),
readdir $dh)) {
+ } elsif (! (my @names = map +( -f "$top/$_" ? s/\.(gz|bz2)\z//nr : ()
), readdir $dh)) {
die "$PROGRAM: Failed to compose a list of valid character maps
from '$top'\n";
} else {
return @names;