diff options
Diffstat (limited to 'pm')
-rw-r--r-- | pm/MGATools/rpmsrate.pm | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm index 2459fa4..f5bb8f0 100644 --- a/pm/MGATools/rpmsrate.pm +++ b/pm/MGATools/rpmsrate.pm @@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # must preread to get locale guessed packages sub preread_rpmsrate { - my ($rpmsrate, $norpmsrate) = @_; + my ($rpmsrate) = @_; my (@rpmsrate, %potloc); foreach (cat_or_die($rpmsrate)) { chomp; @@ -63,10 +63,8 @@ sub preread_rpmsrate { my ($indent, $r, $flags, $data) = /^(\s*)([1-5])?(\s*(?:(?:(?:!\s*)?[0-9A-Z_]+(?:"[^"]*")?(?:\s+(?:\|\|\s+)?)*)+\s+)|\s*)(.*)$/; # postfix is just used not to break the diff when checking if the result is correct my ($postfix) = $data =~ /(\s*)$/; - my (@data, $i); - foreach ([$data =~ /(?:^|\s)(\S+)-(?:\S+)\s+\1-(?:\S+)(?:\s|$)/g], [split ' ', $data]) { - $data[$i++] = [ @$norpmsrate ? any { my $r = $_; any { $r =~ /$_/ } @$norpmsrate ? @{[]} : $r } @$_ : @$_ ]; - } + my @data = ([ $data =~ /(?:^|\s)(\S+)-(?:\S+)\s+\1-(?:\S+)(?:\s|$)/g ], + [ split ' ', $data ]); $potloc{$_} = [] foreach @{$data[0]}; push @rpmsrate, [ $indent,$r, $flags, $data[1], $postfix ]; } @@ -108,10 +106,9 @@ sub check_if_expandable { # function copied from Mkcd::Tools sub cleanrpmsrate { - my ($rpmsrate_file, $output, $norpmsrate, $reprpms, $o_urpm) = @_; - $norpmsrate ||= []; + my ($rpmsrate_file, $output, $reprpms, $o_urpm) = @_; - my ($rpmsrate, $potloc) = preread_rpmsrate($rpmsrate_file, $norpmsrate); + my ($rpmsrate, $potloc) = preread_rpmsrate($rpmsrate_file); my (%rpms, $text, %rate, %section, %keyword, %locale, %localized_pkg); # LIVE & INSTALL keyswords are special: @@ -126,7 +123,6 @@ sub cleanrpmsrate { my $rpm = "$_.rpm"; my $key = $_; s/-[^-]+-[^-]+\.[^.]+$// or next; - any { $rpm =~ /$_/ } @$norpmsrate and next; if (/(.*?)([_-]*[\d._]+)(-.*)?-devel$/ || /^$kernel_like(-[^.]+(?:\.[^.]+){3,6}\.?mga\d+)$/) { if (!$rpms{"$1$3"} || URPM::ranges_overlap("== $2", "> $rpms{'$1$3'}")) { |