diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-04 17:47:16 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-04 17:47:16 +0000 |
commit | 3c9fc85b0bb29148d9b597abb5dd5f359cc38693 (patch) | |
tree | 4dbfa7412f4aa4ecd8aac1a2e607815895674949 | |
parent | 38294b4a10e0c42aea31bd1f8cbad6fb90505637 (diff) | |
download | drakx-3c9fc85b0bb29148d9b597abb5dd5f359cc38693.tar drakx-3c9fc85b0bb29148d9b597abb5dd5f359cc38693.tar.gz drakx-3c9fc85b0bb29148d9b597abb5dd5f359cc38693.tar.bz2 drakx-3c9fc85b0bb29148d9b597abb5dd5f359cc38693.tar.xz drakx-3c9fc85b0bb29148d9b597abb5dd5f359cc38693.zip |
Better version to install urpmi with copied RPMs
-rw-r--r-- | perl-install/install_any.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 1a36db0ac..7af953dfb 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -643,7 +643,7 @@ Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.", } #- now the install will continue as 'disk' $o->{method} = 'disk'; - *any::hdInstallPath = sub () { "/var/ftp/pub/Mandrakelinux" }; + our $copied_rpms_on_disk = 1; } sub set_rpmsrate_default_category_flags { @@ -851,7 +851,8 @@ sub install_urpmi { my $hdInstallPath = any::hdInstallPath(); #- rare case where urpmi cannot be installed (no hd install path). - $method eq 'disk' && !$hdInstallPath and return; + our $copied_rpms_on_disk; + $method eq 'disk' && !$hdInstallPath && !$copied_rpms_on_disk and return; log::l("install_urpmi $method"); #- clean to avoid opening twice the rpm db. @@ -875,7 +876,8 @@ sub install_urpmi { my $name = $_->{fakemedium}; if ($_->{ignored} || $_->{selected}) { my $curmethod = $_->{method} || $::o->{method}; - my $dir = ($_->{prefix} || ${{ nfs => "file://mnt/nfs", + my $dir = (($copied_rpms_on_disk ? "/var/ftp/pub/Mandrakelinux" : '') + || $_->{prefix} || ${{ nfs => "file://mnt/nfs", disk => "file:/" . $hdInstallPath, ftp => $ENV{URLPREFIX}, http => $ENV{URLPREFIX}, |