summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-05 13:32:39 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-05 13:32:39 +0000
commit5233a64be8e18c67fc309865fbaf3bbdca636e81 (patch)
tree9ca743e9ab90dca67f302ca9dc3b32eb7f64c178 /perl-install/install_any.pm
parent99f7728a2c2d4aaafb585e85e06282f429031f94 (diff)
downloaddrakx-5233a64be8e18c67fc309865fbaf3bbdca636e81.tar
drakx-5233a64be8e18c67fc309865fbaf3bbdca636e81.tar.gz
drakx-5233a64be8e18c67fc309865fbaf3bbdca636e81.tar.bz2
drakx-5233a64be8e18c67fc309865fbaf3bbdca636e81.tar.xz
drakx-5233a64be8e18c67fc309865fbaf3bbdca636e81.zip
At some point, an empty hashref is autovivified in $packages->{medium}.
So, protect the loops that iterate over this hash, in application of the belt and suspenders doctrine.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 69686e7de..8646d4ac4 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1021,7 +1021,7 @@ sub warnAboutFilesStillOpen() {
sub install_urpmi {
my ($method, $packages) = @_;
- my @mediums = values %{$packages->{mediums}};
+ my @mediums = grep { defined $_->{medium} } values %{$packages->{mediums}};
my $hdInstallPath = any::hdInstallPath();
#- rare case where urpmi cannot be installed (no hd install path).