summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-13 05:39:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-13 05:39:52 +0000
commit911218913fc33bc8155782a2c26cb92bbd9dae2a (patch)
tree793a34c39dafcd5b3bd448dba10f4a8eb9164e63 /perl-install/install_any.pm
parent5608636beed65eb169ad1ebe4d58411f15d9b400 (diff)
downloaddrakx-911218913fc33bc8155782a2c26cb92bbd9dae2a.tar
drakx-911218913fc33bc8155782a2c26cb92bbd9dae2a.tar.gz
drakx-911218913fc33bc8155782a2c26cb92bbd9dae2a.tar.bz2
drakx-911218913fc33bc8155782a2c26cb92bbd9dae2a.tar.xz
drakx-911218913fc33bc8155782a2c26cb92bbd9dae2a.zip
Ability to choose from the mirror list when assing an ftp supplementary
media. Fix download of hdlists file for ftp supplementary media.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index ca65b0c7b..5d4feaf65 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -199,7 +199,7 @@ sub getFile {
crypto::getFile($f);
} elsif ($current_method eq "ftp") {
require ftp;
- ftp::getFile($rel, @{ $::o->{packages}{mediums}{$asked_medium}{ftp_prefix} || [] });
+ ftp::getFile($rel, @{ $::o->{packages}{mediums}{$asked_medium}{ftp_prefix} || our $global_ftp_prefix || [] });
} elsif ($current_method eq "http") {
require http;
http::getFile(($ENV{URLPREFIX} || $o_altroot) . "/$rel");
@@ -475,7 +475,15 @@ sub selectSupplMedia {
}
}
} else {
- my $url = $o->ask_from_entry('', N("URL of the mirror?")) or return '';
+ my $url;
+ local our $global_ftp_prefix;
+ if ($suppl_method eq 'ftp') { #- mirrors are ftp only (currently)
+ $url = $o->askSupplMirror(N("URL of the mirror?")) or return '';
+ $url =~ m!^ftp://(?:(.*?)(?::(.*?))?@)?([^/]+)/(.*)!
+ and $global_ftp_prefix = [ $3, $4, $1, $2 ]; #- for getFile
+ } else {
+ my $url = $o->ask_from_entry('', N("URL of the mirror?")) or return '';
+ }
useMedium($medium_name);
require "$suppl_method.pm"; #- require http or ftp
#- first, try to find an hdlists file