From 490d1edddbdc645d015e8ad6debc72119d9de8db Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Thu, 4 Jan 2001 18:40:23 +0000 Subject: fixed the functions doing the lists of languages --- perl-install/install_any.pm | 2 +- perl-install/lang.pm | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'perl-install') 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; -- cgit v1.2.1