aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo De Nardin <spuk@mandriva.org>2009-04-17 21:35:33 +0000
committerGustavo De Nardin <spuk@mandriva.org>2009-04-17 21:35:33 +0000
commit177854efc85c0bd321f52fc64c7637b40921d9a5 (patch)
tree0271aa608276a44f7cbf26f1eafa272a098dff66
parent151d438d79ff096b1cb95fd2ac381f978369f3ad (diff)
downloadmga-youri-core-177854efc85c0bd321f52fc64c7637b40921d9a5.tar
mga-youri-core-177854efc85c0bd321f52fc64c7637b40921d9a5.tar.gz
mga-youri-core-177854efc85c0bd321f52fc64c7637b40921d9a5.tar.bz2
mga-youri-core-177854efc85c0bd321f52fc64c7637b40921d9a5.tar.xz
mga-youri-core-177854efc85c0bd321f52fc64c7637b40921d9a5.zip
- catch kernel debug packages, which have -debug- somewhere in the name, but never at the end
-rw-r--r--lib/Youri/Package/RPM.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Youri/Package/RPM.pm b/lib/Youri/Package/RPM.pm
index fc85db0..1f72830 100644
--- a/lib/Youri/Package/RPM.pm
+++ b/lib/Youri/Package/RPM.pm
@@ -42,7 +42,17 @@ sub is_debug {
my ($self) = @_;
croak "Not a class method" unless ref $self;
- return $self->get_name() =~ /-debug$/o && $self->get_tag('group') =~ m,^Development/Debug$,;
+ my $name = $self->get_name();
+ my $group = $self->get_tag('group');
+
+ # debug packages' names must end in -debug, except kernel
+ if ($group =~ m,^Development/Debug$, &&
+ ($name =~ /-debug$/o || $name =~ /^kernel-.*-debug/o)) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
}
1;