summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/Makefile4
-rw-r--r--perl-install/install2.pm18
-rw-r--r--perl-install/install_steps_interactive.pm3
-rw-r--r--perl-install/timezone.pm10
4 files changed, 23 insertions, 12 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index cc1991b19..7ae8bb947 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -117,7 +117,7 @@ get_needed_files: $(SO_FILES)
d=`echo $(DEST)/$$i | sed 's/\/usr\/local\//\/usr\//'`; \
install -d `dirname $$d` && \
if (echo $$i | grep -q "\.pm"); then \
- perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \
+ perl -ne '$$_ =~ /^__END__/ and exit(0); print unless /\s*#-/' $$i > $$d; \
else \
cp -f $$i $$d; \
strip $$d 2>/dev/null || true; \
@@ -140,7 +140,7 @@ get_needed_files: $(SO_FILES)
cp -a keymaps $(DEST)/usr/share
cp -a consolefonts $(DEST)/usr/share
- cp MonitorsDB $(DEST)/usr/share
+ cp modparm.lst MonitorsDB $(DEST)/usr/share
cp logo-mandrake.xpm $(DEST)/usr/share
cp compss compssList $(ROOTDEST)/Mandrake/base
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 4f2ca84b2..3e51ad00d 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -22,6 +22,7 @@ use printer;
use modules;
use detect_devices;
use smp;
+use modparm;
use run_program;
use install_steps_graphical;
@@ -279,12 +280,12 @@ $o = $::o = {
# { mntpoint => "/usr", size => 400 << 11, type => 0x83, growable => 1 },
# ],
shells => [ map { "/bin/$_" } qw(bash tcsh zsh ash ksh) ],
- lang => 'us',
+ lang => 'en',
isUpgrade => 0,
installClass => "beginner",
timezone => {
- timezone => "Europe/Paris",
+# timezone => "Europe/Paris",
GMT => 1,
},
printer => {
@@ -578,19 +579,20 @@ sub main {
#the main cycle
my $clicked = 0;
- for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) {
+ MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) {
$o->enteringStep($o->{step});
$o->{steps}{$o->{step}}{entered}++;
eval {
&{$install2::{$o->{step}}}($clicked, $o->{steps}{$o->{step}}{entered});
};
$clicked = 0;
- $@ =~ /^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo;
- $@ =~ /^theme_changed$/ and redo;
- if ($@) {
- $o->errorInStep($@);
+ while ($@) {
+ $@ =~ /^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo MAIN;
+ $@ =~ /^theme_changed$/ and redo MAIN;
+ eval { $o->errorInStep($@) };
+ $@ and next;
$o->{step} = $o->{steps}{$o->{step}}{onError};
- redo;
+ redo MAIN;
}
$o->leavingStep($o->{step});
$o->{steps}{$o->{step}}{done} = 1;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index f4e91fd2d..e4bb09f97 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -15,6 +15,7 @@ use partition_table qw(:types);
use install_steps;
use install_any;
use detect_devices;
+use timezone;
use network;
use modules;
use lang;
@@ -211,7 +212,7 @@ sub timeConfig {
my ($o, $f) = @_;
$o->{timezone}{GMT} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{GMT});
- $o->{timezone}{timezone} ||=
+ $o->{timezone}{timezone} ||= timezone::bestTimezone(lang::lang2text($o->{lang}));
$o->{timezone}{timezone} = $o->ask_from_list('', _("In which timezone are you"), [ timezone::getTimeZones($o->{prefix}) ], $o->{timezone}{timezone});
install_steps::timeConfig($o,$f);
}
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 8ff037a0f..b6f9cb364 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -3,6 +3,7 @@ package timezone;
use diagnostics;
use strict;
+use common;
sub getTimeZones {
@@ -43,9 +44,16 @@ my %l2t = (
'Russian (Russia)' => 'Europe/Moscow',
'Slovak (Slovakia)' => 'Europe/Bratislava',
'Spanish (Spain)' => 'Europe/Madrid',
-'Swedish (Finland)' => 'Europe/Helsinki'
+'Swedish (Finland)' => 'Europe/Helsinki',
'Swedish (Sweden)' => 'Europe/Stockholm',
'Turkish (Turkey)' => 'Europe/Istanbul',
'Ukrainian (Ukraine)' => 'Europe/Kiev',
'Walon (Belgium)' => 'Europe/Brussels',
);
+
+sub bestTimezone {
+ my ($langtext) = @_;
+ $l2t{common::bestMatchSentence($langtext, keys %l2t)};
+}
+
+1;