summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-28 03:23:32 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-28 03:23:32 +0000
commitf3eca0affbbeedb2aabeb3fe3cb869045fbbf880 (patch)
tree898b11332124d5651662824b24d4ca7037c53b72 /perl-install/install_any.pm
parent467534e0a4b0f9fb6cac6f532bd60defe8077b0a (diff)
downloaddrakx-f3eca0affbbeedb2aabeb3fe3cb869045fbbf880.tar
drakx-f3eca0affbbeedb2aabeb3fe3cb869045fbbf880.tar.gz
drakx-f3eca0affbbeedb2aabeb3fe3cb869045fbbf880.tar.bz2
drakx-f3eca0affbbeedb2aabeb3fe3cb869045fbbf880.tar.xz
drakx-f3eca0affbbeedb2aabeb3fe3cb869045fbbf880.zip
Fix install_urpmi with nfs suppl media
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index b650c2852..3fa2596d8 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -596,10 +596,13 @@ sub selectSupplMedia {
sub setup_suppl_medium {
my ($supplmedium, $url, $suppl_method) = @_;
- $supplmedium->{prefix} = $url; #- for install_urpmi
+ $supplmedium->{prefix} = $url;
if ($suppl_method eq 'ftp') {
$url =~ m!^ftp://(?:(.*?)(?::(.*?))?\@)?([^/]+)/(.*)!
and $supplmedium->{ftp_prefix} = [ $3, $4, $1, $2 ]; #- for getFile
+ } elsif ($suppl_method eq 'nfs') { #- once installed, path changes
+ $supplmedium->{finalprefix} = $supplmedium->{prefix};
+ $supplmedium->{finalprefix} =~ s/^\Q$::prefix//;
}
$supplmedium->select;
$supplmedium->{method} = $suppl_method;
@@ -763,7 +766,7 @@ Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.",
ejectCdrom() if $o->{method} eq "cdrom";
#- now the install will continue as 'disk'
$o->{method} = 'disk';
- #- shoud be enough to fool errorOpeningFile
+ #- should be enough to fool errorOpeningFile
$current_medium = 1;
our $copied_rpms_on_disk = 1;
}
@@ -1016,13 +1019,15 @@ sub install_urpmi {
if ($_->ignored || $_->selected) {
my $curmethod = $_->method || $::o->{method};
my $dir = (($copied_rpms_on_disk ? "/var/ftp/pub/Mandrivalinux" : '')
- || $_->{prefix} || ${{ nfs => "file://mnt/nfs",
- disk => "file:/" . $hdInstallPath,
- ftp => $ENV{URLPREFIX},
- http => $ENV{URLPREFIX},
- cdrom => "removable://mnt/cdrom" }}{$curmethod} ||
- #- for live_update or live_install script.
- readlink("/tmp/image/media") =~ m,^(/.*)/media/*$, && "removable:/$1") . "/$_->{rpmsdir}";
+ || $_->{finalprefix}
+ || $_->{prefix}
+ || ${{ nfs => "file://mnt/nfs",
+ disk => "file:/" . $hdInstallPath,
+ ftp => $ENV{URLPREFIX},
+ http => $ENV{URLPREFIX},
+ cdrom => "removable://mnt/cdrom" }}{$curmethod}
+ || #- for live_update or live_install script.
+ readlink("/tmp/image/media") =~ m,^(/.*)/media/*$, && "removable:/$1") . "/$_->{rpmsdir}";
#- use list file only if visible password or macro.
my $need_list = $dir =~ m,^(?:[^:]*://[^/:\@]*:[^/:\@]+\@|.*%{),; #- }