diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-28 03:23:32 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-28 03:23:32 +0000 |
commit | f3eca0affbbeedb2aabeb3fe3cb869045fbbf880 (patch) | |
tree | 898b11332124d5651662824b24d4ca7037c53b72 /perl-install | |
parent | 467534e0a4b0f9fb6cac6f532bd60defe8077b0a (diff) | |
download | drakx-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')
-rw-r--r-- | perl-install/install_any.pm | 23 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 3 |
2 files changed, 16 insertions, 10 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,^(?:[^:]*://[^/:\@]*:[^/:\@]+\@|.*%{),; #- } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index db6aa1960..7a738b9e6 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -1445,7 +1445,8 @@ use strict; #- key_ids (hashref, values are key ids) #- medium (number of the medium) #- method -#- prefix (for install_urpmi) +#- prefix +#- finalprefix (for install_urpmi) #- pubkey #- rpmsdir #- selected |