summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-04 19:34:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-04 19:34:30 +0000
commit9887fe04751edf39e8389f2c3ec3f020b5e1c17d (patch)
tree1bccff5e0f3a44ece23808f6a5dd427f1342a434 /perl-install
parent490d1edddbdc645d015e8ad6debc72119d9de8db (diff)
downloaddrakx-9887fe04751edf39e8389f2c3ec3f020b5e1c17d.tar
drakx-9887fe04751edf39e8389f2c3ec3f020b5e1c17d.tar.gz
drakx-9887fe04751edf39e8389f2c3ec3f020b5e1c17d.tar.bz2
drakx-9887fe04751edf39e8389f2c3ec3f020b5e1c17d.tar.xz
drakx-9887fe04751edf39e8389f2c3ec3f020b5e1c17d.zip
keep $o->{langs} unpacked to simplify things
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm3
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm8
-rw-r--r--perl-install/lang.pm21
-rw-r--r--perl-install/pkgs.pm1
5 files changed, 8 insertions, 27 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 7f8383bd7..7c8cd1d1f 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -22,7 +22,6 @@ use devices;
use fsedit;
use modules;
use detect_devices;
-use lang;
use any;
use log;
use fs;
@@ -310,7 +309,7 @@ sub setPackages {
$o->{compssUsersChoice}{SYSTEM} = 1;
$o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}} } @{$o->{compssUsersSorted}};
- foreach (@{lang::unpack_lang_codes(lang::pack_langs($o->{langs}))}) {
+ foreach (map { substr($_, 0, 2) } @{$o->{langs}}) {
push @{$o->{default_packages}}, pkgs::packageByName($o->{packages}, "locales-$_") || next;
$o->{compssUsersChoice}{qq(LOCALES"$_")} = 1;
}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index a8c575363..9340739f2 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -98,7 +98,7 @@ sub selectLanguage {
sub selectKeyboard {
my ($o) = @_;
keyboard::setup($o->{keyboard});
- $o->{langs} ||= lang::pack_langs([ $o->{lang} ]);
+ $o->{langs} ||= [ $o->{lang} ];
}
#------------------------------------------------------------------------------
sub selectPath {}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 662884334..e20992315 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -160,18 +160,18 @@ sub selectKeyboard($) {
if ($::expert && ref($o) !~ /newt/) { #- newt is buggy with big windows :-(
$o->set_help('selectLangs');
- $o->{langs} ||= substr($o->{lang}, 0, 2);
- my $all = $o->{langs} =~ /all/;
+ $o->{langs} ||= [ $o->{lang} ];
+ my $all = member('all', @{$o->{langs}});
my $l = $o->ask_many_from_list('',
_("You can choose other languages that will be available after install"),
{
list => [ lang::list() ],
label => sub { lang::lang2text($_) },
- values => lang::unpack_langs($o->{langs}),
+ values => $o->{langs},
sort => 1,
},
{ list => ['all'], label => sub { _("All") }, ref => sub { \$all }, shadow => 0 }) or goto &selectKeyboard;
- $o->{langs} = $all ? 'all' : lang::pack_langs($l);
+ $o->{langs} = [ $all ? 'all' : $l ];
}
install_steps::selectKeyboard($o);
}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index ebea1a86a..a282c444a 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -302,28 +302,11 @@ sub pack_langs {
join ':', uniq(map { $languages{$_}[3] } @$l);
}
-sub unpack_langs {
- my ($langs) = @_;
- [
- $langs eq 'all' ?
- map { $_->[2] } values %languages :
- split(':', $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) = @_;
+ my $s = pack_langs($langs);
symlink "$prefix/etc/rpm", "/etc/rpm" if $prefix;
- substInFile { s/%_install_langs.*//; $_ .= "%_install_langs $langs\n" if eof } "$prefix/etc/rpm/macros";
+ substInFile { s/%_install_langs.*//; $_ .= "%_install_langs $s\n" if eof } "$prefix/etc/rpm/macros";
}
sub write {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 20d8ce003..7ee8b14f0 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -13,7 +13,6 @@ use log;
use pkgs;
use fs;
use loopback;
-use lang;
use c;