diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 12:51:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 12:51:15 +0000 |
commit | 6463741776a1fdaf3ac15279844352634490feaf (patch) | |
tree | 6313d8d259f65decb1b456004e05477e6ed2860b | |
parent | 4584b7d10c4a7263215a8ae2564028100fdef0c2 (diff) | |
download | mga-youri-submit-6463741776a1fdaf3ac15279844352634490feaf.tar mga-youri-submit-6463741776a1fdaf3ac15279844352634490feaf.tar.gz mga-youri-submit-6463741776a1fdaf3ac15279844352634490feaf.tar.bz2 mga-youri-submit-6463741776a1fdaf3ac15279844352634490feaf.tar.xz mga-youri-submit-6463741776a1fdaf3ac15279844352634490feaf.zip |
handle new rpmlint format
(not useful at the moment since we still use old rpmlint, but may be useful in
the future)
-rw-r--r-- | lib/Youri/Submit/Check/Rpmlint.pm | 5 |
1 files 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 = <RPMLINT>) { - 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"); } |