summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 708a6b5da..1d2d6a7f8 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -43,11 +43,11 @@ sub write {
my ($prefix) = @_;
my $lang = $ENV{LANG};
- $::testing || !$lang and return 0;
+ $lang or return;
local *F;
- open F, "> $prefix/etc/sysconfig/i18n";
-
+ open F, "> $prefix/etc/sysconfig/i18n" or die "failed to reset $prefix/etc/sysconfig/i18n for writing";
my $f = sub { $_[1] and print F "$_[0]=$_[1]\n"; };
+
&$f("LANG", $lang);
&$f("LINGUAS", $lang);
if (my $l = $languages{$lang}) {
@@ -61,7 +61,6 @@ sub write {
glob_("$p/consoletrans/$l->{map}*"),
"$prefix/etc/sysconfig/console");
}
- 1;
}
sub load_font {