diff options
author | Francois Pons <fpons@mandriva.com> | 2003-02-19 16:51:31 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-02-19 16:51:31 +0000 |
commit | f823ee7b832e4b4fa34d76dd945cb35a5c444233 (patch) | |
tree | ca7b540c7706affd95f57a08c4b2ba1bdb631331 /perl-install/install_steps_interactive.pm | |
parent | 0208a257afaf43c81d2fc213402ff4bdbedc51d2 (diff) | |
download | drakx-f823ee7b832e4b4fa34d76dd945cb35a5c444233.tar drakx-f823ee7b832e4b4fa34d76dd945cb35a5c444233.tar.gz drakx-f823ee7b832e4b4fa34d76dd945cb35a5c444233.tar.bz2 drakx-f823ee7b832e4b4fa34d76dd945cb35a5c444233.tar.xz drakx-f823ee7b832e4b4fa34d76dd945cb35a5c444233.zip |
added code to retry finding an update medium if something went wrong.
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 7041f0d0d..5fbbe1ebb 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -747,26 +747,32 @@ Do you want to install the updates ?")), #- bring all interface up for installing crypto packages. install_interactive::upNetwork($o); - require crypto; - eval { - my @mirrors = do { my $_w = $o->wait_message('', - N("Contacting Mandrake Linux web site to get the list of available mirrors...")); - crypto::mirrors() }; - #- if no mirror have been found, use current time zone and propose among available. - $u->{mirror} ||= crypto::bestMirror($o->{timezone}{timezone}); - $u->{mirror} = $o->ask_from_treelistf('', - N("Choose a mirror from which to get the packages"), - '|', - \&crypto::mirror2text, - \@mirrors, - $u->{mirror}); - }; - return if $@ || !$u->{mirror}; + #- update medium available and working. + my $update_medium; + do { + require crypto; + eval { + my @mirrors = do { + my $_w = $o->wait_message('', N("Contacting Mandrake Linux web site to get the list of available mirrors...")); + crypto::mirrors() }; + #- if no mirror have been found, use current time zone and propose among available. + $u->{mirror} ||= crypto::bestMirror($o->{timezone}{timezone}); + $u->{mirror} = $o->ask_from_treelistf('', + N("Choose a mirror from which to get the packages"), + '|', + \&crypto::mirror2text, + \@mirrors, + $u->{mirror}); + }; + return if $@; - my $update_medium = do { - my $_w = $o->wait_message('', N("Contacting the mirror to get the list of available packages...")); - crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); - }; + eval { + if ($u->{mirror}) { + my $_w = $o->wait_message('', N("Contacting the mirror to get the list of available packages...")); + $update_medium = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}); + } + }; + } while $@; if ($update_medium) { if ($o->choosePackagesTree($o->{packages}, $update_medium)) { |