diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-08 06:24:51 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-08 06:24:51 +0000 |
commit | 63e90060206ee4607f1bd1faa82b4eaa770276a1 (patch) | |
tree | b8c9cfefff17859637bdaf9e08c3b3c879c2a8cc | |
parent | 3d0c9be0ca3648dc6a212eb62854663fc3a354d9 (diff) | |
download | drakx-backup-do-not-use-63e90060206ee4607f1bd1faa82b4eaa770276a1.tar drakx-backup-do-not-use-63e90060206ee4607f1bd1faa82b4eaa770276a1.tar.gz drakx-backup-do-not-use-63e90060206ee4607f1bd1faa82b4eaa770276a1.tar.bz2 drakx-backup-do-not-use-63e90060206ee4607f1bd1faa82b4eaa770276a1.tar.xz drakx-backup-do-not-use-63e90060206ee4607f1bd1faa82b4eaa770276a1.zip |
Always return a hashref from pkgs::packageMedium()
-rw-r--r-- | perl-install/pkgs.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index ecbbd26c9..edf7fbcb3 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -41,12 +41,14 @@ my %ignoreBadPkg = ( 'rt2-demo' => 1, ); -sub packageMedium { my ($packages, $p) = @_; $p or die "invalid package from\n" . backtrace(); - foreach (values %{$packages->{mediums}}) { - defined $_->{start} && defined $_->{end} or next; - $p->id >= $_->{start} && $p->id <= $_->{end} and return $_; - } - return } +sub packageMedium { + my ($packages, $p) = @_; $p or die "invalid package from\n" . backtrace(); + foreach (values %{$packages->{mediums}}) { + defined $_->{start} && defined $_->{end} or next; + $p->id >= $_->{start} && $p->id <= $_->{end} and return $_; + } + return {}; +} sub cleanHeaders { my ($prefix) = @_; |