diff options
author | Pablo Saratxaga <pablo@mandriva.com> | 2001-01-04 18:40:23 +0000 |
---|---|---|
committer | Pablo Saratxaga <pablo@mandriva.com> | 2001-01-04 18:40:23 +0000 |
commit | 490d1edddbdc645d015e8ad6debc72119d9de8db (patch) | |
tree | d1f7d50295d5dacc17e60e362007debce948e5b0 | |
parent | 19f9e6b8f8f8252341e0cee3319f11b7ada9e6de (diff) | |
download | drakx-backup-do-not-use-490d1edddbdc645d015e8ad6debc72119d9de8db.tar drakx-backup-do-not-use-490d1edddbdc645d015e8ad6debc72119d9de8db.tar.gz drakx-backup-do-not-use-490d1edddbdc645d015e8ad6debc72119d9de8db.tar.bz2 drakx-backup-do-not-use-490d1edddbdc645d015e8ad6debc72119d9de8db.tar.xz drakx-backup-do-not-use-490d1edddbdc645d015e8ad6debc72119d9de8db.zip |
fixed the functions doing the lists of languages
-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; |