summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-06 15:21:56 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-06 15:21:56 +0000
commit7690e5cbaa64e6fc0cd4f0bf18e393740343407a (patch)
treebece6e0534550923dd9a830d48737f3af6eb9f45 /perl-install/install_any.pm
parentdd79ad76b03327e6432bda59a205bdddadfd9f42 (diff)
downloaddrakx-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.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm19
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} || {}};