aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Youri/Repository/Mandriva_upload.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm
index 5ee4640..05730b5 100644
--- a/lib/Youri/Repository/Mandriva_upload.pm
+++ b/lib/Youri/Repository/Mandriva_upload.pm
@@ -270,6 +270,25 @@ sub get_replaced_packages {
);
}
+ # kernel packages have the version in the name
+ # binary dkms built for old kernels have to be removed too
+
+ if ($name =~ /^kernel-([^\d]*)-([\d.]*)-(.*)$/) { # "desktop", "2.6.28", "2mnb"
+ push(@replaced_packages,
+ map { PACKAGE_CLASS->new(file => $_) }
+ $self->get_files(
+ $self->{_install_root},
+ $self->get_install_path($package, $target, $user_context, $app_context),
+ PACKAGE_CLASS->get_pattern(
+ '(kernel-' . $1 . '-\d.*|.*-kernel-[\d.]*-' . $1 . '-\d.*)',
+ undef,
+ undef,
+ $package->get_arch()
+ ),
+ )
+ );
+ }
+
return @replaced_packages;
}