Merge pull request #1091 from jberry-suse/repo_checker.pl-safer-parse

repo_checker.pl: ensure that parser does not bleed over to other sections.
This commit is contained in:
Jimmy Berry 2017-08-24 20:51:36 -05:00 committed by GitHub
commit 55bfb95d8f

View File

@ -103,9 +103,10 @@ while (<INSTALL>) {
chomp;
next if (/^unknown line:.*Flx/);
if ( $_ =~ /^can't install (.*)-[^-]+-[^-]+:$/ ) {
if ($_ =~ /^[^ ]/) {
$inc = 0;
}
if ( $_ =~ /^can't install (.*)-[^-]+-[^-]+:$/ ) {
if ( defined $targets{$1} ) {
$inc = 1;
$ret = 1;
@ -131,9 +132,10 @@ $inc = 0;
while (<CONFLICTS>) {
chomp;
if ( $_ =~ /^found conflict of (.*)-[^-]+-[^-]+ with (.*)-[^-]+-[^-]+:$/ ) {
if ($_ =~ /^[^ ]/) {
$inc = 0;
}
if ( $_ =~ /^found conflict of (.*)-[^-]+-[^-]+ with (.*)-[^-]+-[^-]+:$/ ) {
if ( defined $targets{$1} || defined $targets{$2} ) {
$inc = 1;
$ret = 1;