summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-06 15:57:15 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-06 15:57:15 +0000
commitc2a5241679a93f99959cbe85b06dc2b31868ef11 (patch)
treec67dea53f68564496df861202372c3305f888abb /perl-install
parent23e13f4748fdb78c859e6f528619326807c36175 (diff)
downloaddrakx-c2a5241679a93f99959cbe85b06dc2b31868ef11.tar
drakx-c2a5241679a93f99959cbe85b06dc2b31868ef11.tar.gz
drakx-c2a5241679a93f99959cbe85b06dc2b31868ef11.tar.bz2
drakx-c2a5241679a93f99959cbe85b06dc2b31868ef11.tar.xz
drakx-c2a5241679a93f99959cbe85b06dc2b31868ef11.zip
(get_media_cfg) fix URI for HTTP/FTP/NFS supplementary media
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/media.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 3ab8af56b..e6f64896a 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -636,8 +636,18 @@ sub get_media_cfg {
log::l(Data::Dumper->Dump([ $phys_medium ], [ 'phys_medium' ]));
log::l(Data::Dumper->Dump([ $o->{stage2_phys_medium} ], [ 'stage2_phys_medium' ]));
- my $uri = $o->{stage2_phys_medium}{url} =~ m!^(http|ftp)://! && $o->{stage2_phys_medium}{url} ||
- $phys_medium->{method} =~ m!^(ftp|http)://! && $phys_medium->{method} || '/tmp/image';
+ my $uri;
+ if ($phys_medium->{is_suppl}) {
+ if (member($phys_medium->{method}, qw(ftp http))) {
+ $uri = $phys_medium->{url};
+ $uri =~ s!/media$!!;
+ } elsif ($phys_medium->{method} eq 'nfs') {
+ $uri = "$::prefix/$phys_medium->{mntpoint}";
+ }
+ } else {
+ $uri = $o->{stage2_phys_medium}{url} =~ m!^(http|ftp)://! && $o->{stage2_phys_medium}{url} ||
+ $phys_medium->{method} =~ m!^(ftp|http)://! && $phys_medium->{method} || '/tmp/image';
+ }
log::l("adding distrib media from $uri");
urpm::media::add_distrib_media($packages, undef, $uri, ask_media => undef); #allmedia => 1