aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-01-16 13:19:54 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-01-16 13:19:54 +0000
commitd27dc77d077cdc88dc4582eb5604c6a8ea1fc11d (patch)
tree13db5f7a6888f591542b3009a9ad1de170682503
parentedf7a7b73596c25d3a6fc822bc84710a3850da5d (diff)
downloadmga-youri-core-d27dc77d077cdc88dc4582eb5604c6a8ea1fc11d.tar
mga-youri-core-d27dc77d077cdc88dc4582eb5604c6a8ea1fc11d.tar.gz
mga-youri-core-d27dc77d077cdc88dc4582eb5604c6a8ea1fc11d.tar.bz2
mga-youri-core-d27dc77d077cdc88dc4582eb5604c6a8ea1fc11d.tar.xz
mga-youri-core-d27dc77d077cdc88dc4582eb5604c6a8ea1fc11d.zip
Handle kernel packages versionning in get_replaced_packages
-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;
}