diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-12 20:59:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-12 20:59:55 +0000 |
commit | f59baab5976948265cd839347cde693cb43a2c4a (patch) | |
tree | 34a9adb913c86cf3946d0af785e89a05828ab22d /perl-install/pkgs.pm | |
parent | 50bdbd03aeb42f3cc96b1aa9edeb53b549401bac (diff) | |
download | drakx-f59baab5976948265cd839347cde693cb43a2c4a.tar drakx-f59baab5976948265cd839347cde693cb43a2c4a.tar.gz drakx-f59baab5976948265cd839347cde693cb43a2c4a.tar.bz2 drakx-f59baab5976948265cd839347cde693cb43a2c4a.tar.xz drakx-f59baab5976948265cd839347cde693cb43a2c4a.zip |
change return type of pkgs::packages2kernels()
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 1cf32fba7..b61755b8c 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -174,7 +174,7 @@ sub packages2kernels { map { my $pkg = $packages->{depslist}[$_]; if (my ($ext, $version) = analyse_kernel_name($pkg->name)) { - [ $pkg, $ext, $version ]; + { pkg => $pkg, ext => $ext, version => $version }; } else { log::l("ERROR: unknown package " . $pkg->name . " providing kernel"); (); @@ -187,16 +187,16 @@ sub bestKernelPackage { my @kernels = packages2kernels($packages) or internal_error('no kernel available'); my ($version_BOOT) = c::kernel_version() =~ /^(\d+\.\d+)/; - if (my @l = grep { $_->[2] =~ /\Q$version_BOOT/ } @kernels) { + if (my @l = grep { $_->{version} =~ /\Q$version_BOOT/ } @kernels) { #- favour versions corresponding to current BOOT version @kernels = @l; } - if (my @l = grep { $_->[1] eq '' } @kernels) { + if (my @l = grep { $_->{ext} eq '' } @kernels) { @kernels = @l; } - log::l("bestKernelPackage: " . join(' ', map { $_->[0]->name } @kernels) . (@kernels > 1 ? ' (choosing the first)' : '')); - $kernels[0][0]; + log::l("bestKernelPackage: " . join(' ', map { $_->{pkg}->name } @kernels) . (@kernels > 1 ? ' (choosing the first)' : '')); + $kernels[0]{pkg}; } sub packagesOfMedium { |