diff options
author | Francois Pons <fpons@mandriva.com> | 2002-01-04 16:41:45 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-01-04 16:41:45 +0000 |
commit | aa560937696c59232dfdf00f3b493b8f85bf412a (patch) | |
tree | fb69a3a5fba8ad2d14714da1ac99265485dd8151 /perl-install/install_any.pm | |
parent | 254cfcd2acdd915bd37e73d36868f26d5b7587fa (diff) | |
download | drakx-aa560937696c59232dfdf00f3b493b8f85bf412a.tar drakx-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.gz drakx-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.bz2 drakx-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.xz drakx-aa560937696c59232dfdf00f3b493b8f85bf412a.zip |
added update installation support to install (big modifs need testing).
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index f5fa3ddf9..0821cef2e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -134,7 +134,7 @@ sub getFile { if ($f =~ m|^http://|) { require http; http::getFile($f); - } elsif ($method =~ /crypto/i) { + } elsif ($method =~ /crypto|update/i) { require crypto; crypto::getFile($f); } elsif ($::o->{method} eq "ftp") { @@ -195,7 +195,7 @@ sub setup_postinstall_rpms($$) { #- the complete filename of each package. #- copy the package files in the postinstall RPMS directory. #- last arg is default medium '' known as the CD#1. - pkgs::extractHeaders($prefix, \@toCopy, $packages->{mediums}{$boot_medium}); + pkgs::extractHeaders($prefix, \@toCopy, $packages->{mediums}); cp_af((map { "/tmp/image/" . relGetFile(pkgs::packageFile($_)) } @toCopy), $postinstall_rpms); log::l("copying Auto Install Floppy"); @@ -517,7 +517,7 @@ sub install_urpmi { #- rare case where urpmi cannot be installed (no hd install path). $method eq 'disk' && !hdInstallPath() and return; - my @cfg = map_index { + my @cfg = map { my $name = $_->{fakemedium}; local *LIST; @@ -525,11 +525,11 @@ sub install_urpmi { open LIST, ">$prefix/var/lib/urpmi/list.$name" or log::l("failed to write list.$name"); umask $mask; - my $dir = ${{ nfs => "file://mnt/nfs", - disk => "file:/" . hdInstallPath(), - ftp => $ENV{URLPREFIX}, - http => $ENV{URLPREFIX}, - cdrom => "removable://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}"; + my $dir = ($_->{prefix} || ${{ nfs => "file://mnt/nfs", + disk => "file:/" . hdInstallPath(), + ftp => $ENV{URLPREFIX}, + http => $ENV{URLPREFIX}, + cdrom => "removable://mnt/cdrom" }}{$method}) . "/$_->{rpmsdir}"; local *FILES; open FILES, "$ENV{LD_LOADER} parsehdlist /tmp/$_->{hdlist} |"; print LIST "$dir/$_\n" foreach chomp_(<FILES>); @@ -548,7 +548,7 @@ sub install_urpmi { } "; - } values %$mediums; + } sort { $a->{medium} <=> $b->{medium} } values %$mediums; eval { output "$prefix/etc/urpmi/urpmi.cfg", @cfg }; #- automatically build all synthesis files. |