commit: ac4880f58a48a5adc3fdaf37dd647356f8021e0f
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Nov 2 23:10:49 2025 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Sun Nov 2 23:12:35 2025 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=ac4880f5
Simplify the list_locales() subroutine
The --prefix option need not be specifed on a conditional basis.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/locale-gen b/locale-gen
index a65b99a..248d780 100644
--- a/locale-gen
+++ b/locale-gen
@@ -257,11 +257,7 @@ sub list_locales ($prefix) {
if (! defined(my $pid = open my $pipe, '-|')) {
die "Can't fork: $!";
} elsif ($pid == 0) {
- my @args = ('--list-archive');
- if (length $prefix) {
- push @args, '--prefix', $prefix;
- }
- run('localedef', @args);
+ run('localedef', '--list-archive', '--prefix', $prefix);
} else {
chomp(my @locales = readline $pipe);
if (! close $pipe && $! == 0) {