From: Lars Kurth Date: Wed, 30 Aug 2017 16:12:15 +0000 (+0100) Subject: Ignore any entries in XSA files that do not contain patch (such as '*.meta' and ... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4e19335f5230a2b85b17a0757ac3e1b6494de53a;p=people%2Flarsk%2Fxen-release-scripts.git Ignore any entries in XSA files that do not contain patch (such as '*.meta' and '** NOT PUBLIC **') --- diff --git a/match-xsa b/match-xsa index f2efd4d..1b4c1d1 100755 --- a/match-xsa +++ b/match-xsa @@ -102,15 +102,20 @@ while (my $line = <$data>) { chomp $line; my @fields = split "[\t]+" , $line; - $XSA[$i] = "$fields[0]"; - $XSA_PATCH[$i] = "$fields[1]"; - $XSA_ID[$i] = "$fields[2]"; + + # Ignore entries, which we don't understand + if ($fields[1] =~ /patch/ ) { + + $XSA[$i] = "$fields[0]"; + $XSA_PATCH[$i] = "$fields[1]"; + $XSA_ID[$i] = "$fields[2]"; - $XSA[$i] =~ s/\r$//g; - $XSA_PATCH[$i] =~ s/\r$//g; - $XSA_ID[$i] =~ s/\r$//g; + $XSA[$i] =~ s/\r$//g; + $XSA_PATCH[$i] =~ s/\r$//g; + $XSA_ID[$i] =~ s/\r$//g; - $i++; + $i++; + } } close($data); $XSAs = $i-1;