summaryrefslogtreecommitdiffstats
path: root/pm
diff options
context:
space:
mode:
Diffstat (limited to 'pm')
-rw-r--r--pm/MGATools/rpmsrate.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm
index 4a41ce0..c2d519a 100644
--- a/pm/MGATools/rpmsrate.pm
+++ b/pm/MGATools/rpmsrate.pm
@@ -53,7 +53,10 @@ sub cleanrpmsrate {
chomp;
s/#.*//;
#s/\s*$//;
- /^(\s*)$/ and push @rpmsrate, [ '', 0, '', [] ] and next;
+ if (/^(\s*)$/) {
+ push @rpmsrate, [ '', 0, '', [] ];
+ next;
+ }
if (/^(\S+)(.*)$/) {
push @rpmsrate, [ 0, 0, $1, [], $2 ];
next;
@@ -64,8 +67,7 @@ sub cleanrpmsrate {
}
my ($indent, $r, $flags, $data) = /^(\s*)([1-5])?(\s*(?:(?:(?:!\s*)?[0-9A-Z_]+(?:"[^"]*")?(?:\s+(?:\|\|\s+)?)*)+\s+)|\s*)(.*)$/;
my ($postfix) = $data =~ /(\s*)$/;
- my @data;
- my $i;
+ my (@data, $i);
foreach ([$data =~ /(?:^|\s)(\S+)-(?:\S+)\s+\1-(?:\S+)(?:\s|$)/g], [split ' ', $data]) {
$data[$i++] = [ @$norpmsrate ? any { my $r = $_; $r if !any { $r =~ /$_/ } @$norpmsrate } @$_ : @$_ ];
}
@@ -73,9 +75,7 @@ sub cleanrpmsrate {
push @rpmsrate, [ $indent,$r, $flags, $data[1], $postfix ];
}
- my (%rpms, $text);
- my (%rate, %section, %keyword);
- my (%locale, %localized_pkg);
+ my (%rpms, $text, %rate, %section, %keyword, %locale, %localized_pkg);
my @plain_flags = qw(INSTALL LIVE);
my $kernel_like = "((?:(?:NVIDIA_)?kernel|NVIDIA_nforce|cm2020).*)";
my $dkms_like = "(.*)([-_])kernel-([0-9]+(?:\.[0-9]+){2,3}-[0-9]+(?:.[^.]+){0,2}md[vk])(.*)";