diff options
author | Francois Pons <fpons@mandriva.com> | 2003-03-06 15:21:56 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-03-06 15:21:56 +0000 |
commit | 7690e5cbaa64e6fc0cd4f0bf18e393740343407a (patch) | |
tree | bece6e0534550923dd9a830d48737f3af6eb9f45 | |
parent | dd79ad76b03327e6432bda59a205bdddadfd9f42 (diff) | |
download | drakx-7690e5cbaa64e6fc0cd4f0bf18e393740343407a.tar drakx-7690e5cbaa64e6fc0cd4f0bf18e393740343407a.tar.gz drakx-7690e5cbaa64e6fc0cd4f0bf18e393740343407a.tar.bz2 drakx-7690e5cbaa64e6fc0cd4f0bf18e393740343407a.tar.xz drakx-7690e5cbaa64e6fc0cd4f0bf18e393740343407a.zip |
added check_kernel_module_packages for checking prioprietary base kernel package.
-rw-r--r-- | perl-install/install_any.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index cdfb7e19b..10046bae1 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1179,6 +1179,25 @@ sub ensure_is_installed { 1; } +sub check_kernel_module_packages { + my ($do, $base_name, $ext_name) = @_; + + if (!$ext_name || pkgs::packageByName($do->{o}{packages}, $ext_name)) { + my @rpms; + foreach my $p (@{$do->{o}{packages}{depslist}}) { + my ($ext, $version, $release) = $p->name =~ /kernel[^-]*(-smp|-enterprise|-secure)?(?:-(\d+\.\d+\.\d+)\.(\d+mdk))?$/ + or next; + $p->flag_available or next; + $version or ($version, $release) = ($p->version, $p->release); + my $name = "$base_name$version-$release$ext"; + pkgs::packageByName($do->{o}{packages}, $name) or next; + push @rpms, $name; + } + @rpms > 0 and return [ @rpms, if_($ext_name, $ext_name) ]; + } + return undef; +} + sub what_provides { my ($do, $name) = @_; map { $do->{o}{packages}{depslist}[$_]->name } keys %{$do->{o}{packages}{provides}{$name} || {}}; |