commit: 7074ff3fec20ee1f8b51822878150d2809544876
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu Sep 18 21:55:51 2025 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Thu Sep 18 21:55:51 2025 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=7074ff3f
Have generate_archive() accept undef to signify no prior archive
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/locale-gen b/locale-gen
index 9ebadbf..c18858f 100644
--- a/locale-gen
+++ b/locale-gen
@@ -115,7 +115,7 @@ umask 0022;
# Integrate the compiled locales into a new locale archive.
my $src_path = do {
- my $prior_archive = $opt{'update'} ? $dst_path : '';
+ my $prior_archive = $opt{'update'} ? $dst_path : undef;
my @canonicals = map +( $_->[2] ), @locales;
generate_archive($gentoo_prefix, $locale_dir, $prior_archive,
@canonicals);
};
@@ -495,7 +495,7 @@ sub generate_archive ($gentoo_prefix, $locale_dir,
$prior_archive, @canonicals)
run('mkdir', '-p', '--', $output_dir);
# If specified, make a copy of the prior archive for updating.
- if (-e $prior_archive) {
+ if (length $prior_archive && -e $prior_archive) {
run('cp', '--', $prior_archive, "$output_dir/");
}