diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-05-26 05:23:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-05-26 05:23:24 +0000 |
commit | 15459009833f8cb01fbb9b6fe00d1b65822d1e57 (patch) | |
tree | 06b24e3ad2e596e560581219ecfd42de443c814f /perl-install/install_any.pm | |
parent | 7f26f4486207e8775f6e1d5df5658687737368fb (diff) | |
download | drakx-15459009833f8cb01fbb9b6fe00d1b65822d1e57.tar drakx-15459009833f8cb01fbb9b6fe00d1b65822d1e57.tar.gz drakx-15459009833f8cb01fbb9b6fe00d1b65822d1e57.tar.bz2 drakx-15459009833f8cb01fbb9b6fe00d1b65822d1e57.tar.xz drakx-15459009833f8cb01fbb9b6fe00d1b65822d1e57.zip |
More refactorisation
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index c33c65d19..e491a8f8e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -697,7 +697,7 @@ sub copy_rpms_on_disk { mkdir "$o->{prefix}/$_", 0755 foreach qw(var var/ftp var/ftp/pub var/ftp/pub/Mandrivalinux var/ftp/pub/Mandrivalinux/media); local *changeMedium = sub { my ($method, $medium) = @_; - my $name = pkgs::mediumDescr($o->{packages}, $medium); + my $name = install_medium::by_id($medium, $o->{packages})->{descr}; if (method_allows_medium_change($method)) { my $r; if ($method =~ /-iso$/) { @@ -965,8 +965,9 @@ sub warnAboutFilesStillOpen() { } sub install_urpmi { - my ($method, $packages, $mediums) = @_; + my ($method, $packages) = @_; + my @mediums = values %{$packages->{mediums}}; my $hdInstallPath = any::hdInstallPath(); #- rare case where urpmi cannot be installed (no hd install path). @@ -980,7 +981,7 @@ sub install_urpmi { #- import pubkey in rpmdb. my $db = pkgs::rpmDbOpenForInstall(); $packages->parse_pubkeys(db => $db); - foreach my $medium (values %$mediums) { + foreach my $medium (@mediums) { $packages->import_needed_pubkeys($medium->{pubkey}, db => $db, callback => sub { my (undef, undef, $_k, $id, $imported) = @_; if ($id) { @@ -991,7 +992,7 @@ sub install_urpmi { } my @cfg; - foreach (sort { $a->{medium} <=> $b->{medium} } values %$mediums) { + foreach (sort { $a->{medium} <=> $b->{medium} } @mediums) { my $name = $_->{fakemedium}; if ($_->ignored || $_->selected) { my $curmethod = $_->method || $::o->{method}; |