summaryrefslogtreecommitdiffstats
path: root/perl-install/do_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-19 14:31:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-19 14:31:44 +0000
commit47a390d1a20b72a9a87e4f89e6a94eadad4ba818 (patch)
treeebc3a8b071318d505bb47e430e4884695ea2f9bf /perl-install/do_pkgs.pm
parent0b243c6d1dd0234af94666d8b0751e1bf487b174 (diff)
downloaddrakx-47a390d1a20b72a9a87e4f89e6a94eadad4ba818.tar
drakx-47a390d1a20b72a9a87e4f89e6a94eadad4ba818.tar.gz
drakx-47a390d1a20b72a9a87e4f89e6a94eadad4ba818.tar.bz2
drakx-47a390d1a20b72a9a87e4f89e6a94eadad4ba818.tar.xz
drakx-47a390d1a20b72a9a87e4f89e6a94eadad4ba818.zip
- factorize kernel regexp in analyse_kernel_name()
- remove special kernel choosing in packageCallbackChoices()
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r--perl-install/do_pkgs.pm23
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index bbcacb620..3bdfe7501 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -62,17 +62,18 @@ sub check_kernel_module_packages {
my ($do, $base_name, $o_ext_name) = @_;
if (!$o_ext_name || pkgs::packageByName($do->{o}{packages}, $o_ext_name)) {
- my @rpms;
- foreach my $p (@{$do->{o}{packages}{depslist}}) {
- my ($ext, $version_release) = $p->name =~ /kernel[^\-]*(-smp|-enterprise|-secure|-i686-up-4GB)?(?:-([^\-]+))?$/
- or next;
- $p->flag_available or next;
- my $name = "$base_name$ext-$version_release";
- pkgs::packageByName($do->{o}{packages}, $name) or next;
- log::l("found kernel module packages $name");
- push @rpms, $name;
- }
- @rpms > 0 and return [ @rpms, if_($o_ext_name, $o_ext_name) ];
+ my @rpms = map {
+ my ($p, $ext, $version) = @$_;
+ my $name = "$base_name$ext-$version";
+ if ($p->flag_available && pkgs::packageByName($do->{o}{packages}, $name)) {
+ log::l("found kernel module packages $name");
+ $name;
+ } else {
+ ();
+ }
+ } pkgs::packages2kernels($do->{o}{packages});
+
+ @rpms and return [ @rpms, if_($o_ext_name, $o_ext_name) ];
}
return undef;
}