aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-31 12:51:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-31 12:51:15 +0000
commit6463741776a1fdaf3ac15279844352634490feaf (patch)
tree6313d8d259f65decb1b456004e05477e6ed2860b
parent4584b7d10c4a7263215a8ae2564028100fdef0c2 (diff)
downloadmga-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.pm5
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");
}