diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_any.pm | 2 | ||||
-rw-r--r-- | perl-install/lang.pm | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index cab5fec86..7f8383bd7 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -310,7 +310,7 @@ sub setPackages { $o->{compssUsersChoice}{SYSTEM} = 1; $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}} } @{$o->{compssUsersSorted}}; - foreach (@{lang::unpack_langs(lang::pack_langs($o->{langs}))}) { + foreach (@{lang::unpack_lang_codes(lang::pack_langs($o->{langs}))}) { push @{$o->{default_packages}}, pkgs::packageByName($o->{packages}, "locales-$_") || next; $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; } diff --git a/perl-install/lang.pm b/perl-install/lang.pm index f8d442765..ebea1a86a 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -299,7 +299,7 @@ sub set { sub pack_langs { my ($l) = @_; member('all', @$l) ? 'all' : - join ':', uniq(map { $languages{$_}[2] } @$l); + join ':', uniq(map { $languages{$_}[3] } @$l); } sub unpack_langs { @@ -311,6 +311,15 @@ sub unpack_langs { ]; } +sub unpack_lang_codes { + my ($langs) = @_; + [ + $langs eq 'all' ? + map { substr($_->[2], 0, 2) } values %languages : + split(':', $langs) + ]; +} + sub write_langs { my ($prefix, $langs) = @_; symlink "$prefix/etc/rpm", "/etc/rpm" if $prefix; |