summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pm/MGATools/rpmsrate.pm26
1 files changed, 19 insertions, 7 deletions
diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm
index 0e0ec53..4f66a2d 100644
--- a/pm/MGATools/rpmsrate.pm
+++ b/pm/MGATools/rpmsrate.pm
@@ -90,13 +90,21 @@ sub cleanrpmsrate {
any { $rpm =~ /$_/ } @$norpmsrate and next;
if (/(.*?)([_-]*[\d._]+)(-.*)?-devel$/ || /^$kernel_like(-[^.]+(?:\.[^.]+){3,6}md[vk])$/) {
- if (!$rpms{"$1$3"}) { $rpms{"$1$3"} = [ $2, $1, $3 ] }
- elsif (URPM::ranges_overlap("== $2", "> $rpms{'$1$3'}")) { $rpms{"$1$3"} = [ $2, $1, $3 ] }
- if (/^$kernel_like-(\d+\.\d+)(.*)/) { $rpms{"$1-$2"} = [ $3, "$1-$2" ] }
+ if (!$rpms{"$1$3"}) {
+ $rpms{"$1$3"} = [ $2, $1, $3 ];
+ } elsif (URPM::ranges_overlap("== $2", "> $rpms{'$1$3'}")) {
+ $rpms{"$1$3"} = [ $2, $1, $3 ];
+ }
+ if (/^$kernel_like-(\d+\.\d+)(.*)/) {
+ $rpms{"$1-$2"} = [ $3, "$1-$2" ];
+ }
} elsif (/^$dkms_like$/) {
my $vname = "$1$2kernel$4";
- if (!$rpms{$vname}) { $rpms{$vname} = [ $3, $vname ] }
- elsif (URPM::ranges_overlap("== $3", "> $rpms{$vname}[0]")) { $rpms{$vname} = [ $3, $vname ] }
+ if (!$rpms{$vname}) {
+ $rpms{$vname} = [ $3, $vname ];
+ } elsif (URPM::ranges_overlap("== $3", "> $rpms{$vname}[0]")) {
+ $rpms{$vname} = [ $3, $vname ];
+ }
} elsif (my ($pg, $loc) = /^(.*)-([^-+]+)$/) {
if ($potloc{$pg}) {
my $pkg;
@@ -159,7 +167,10 @@ sub cleanrpmsrate {
push @flags, split(' ', $flags);
#push @flags, grep { s/\s//; !/(\|\||[A-Z_]+"[^"]+")/ } split(' ', $flags);
- if (!@$data) { $text .= "$indent$r$flags$postfix\n"; next }
+ if (!@$data) {
+ $text .= "$indent$r$flags$postfix\n";
+ next;
+ }
my @k;
my $flat_path = join ' ', @flags;
@@ -202,7 +213,8 @@ sub cleanrpmsrate {
push @k, $c;
push @{$done{$c}}, $flat_path;
}
- if (@k) { $text .= "$indent$r$flags@k$postfix\n" }
+
+ $text .= "$indent$r$flags@k$postfix\n" if @k;
@rate{@k} = ($rate) x @k;
my $path;
foreach (@flags) {