From 6463741776a1fdaf3ac15279844352634490feaf Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 31 Aug 2007 12:51:15 +0000 Subject: handle new rpmlint format (not useful at the moment since we still use old rpmlint, but may be useful in the future) --- lib/Youri/Submit/Check/Rpmlint.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Youri/Submit/Check/Rpmlint.pm b/lib/Youri/Submit/Check/Rpmlint.pm index a38f2ba..da2240d 100644 --- a/lib/Youri/Submit/Check/Rpmlint.pm +++ b/lib/Youri/Submit/Check/Rpmlint.pm @@ -68,8 +68,9 @@ sub run { my $command = "$self->{_path} -f $self->{_config} " . $package->as_file(); open(RPMLINT, "$command |") or die "Can't run $command: $!"; while (my $line = ) { - my ($id, $value) = $line =~ /^[EW]: \S+ (\S+)(.*)$/; - $id or next; + $line =~ /^[EW]: \S+ (\S+)(.*)$/ # old rpmlint format + || $line =~ /^\S+: [EW]: (\S+)(.*)$/ or next; # new rpmlint format + my ($id, $value) = ($1, $2); if ($id =~ /$self->{_pattern}/o) { push(@errors, "$id$value"); } -- cgit v1.2.1