diff options
-rw-r--r-- | pm/MGATools/rpmsrate.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm index 9c39b56..190dd42 100644 --- a/pm/MGATools/rpmsrate.pm +++ b/pm/MGATools/rpmsrate.pm @@ -1,7 +1,7 @@ package MGATools::rpmsrate; use strict; -use MDK::Common qw(any member); +use MDK::Common qw(any cat_or_die member); require Exporter; use URPM; @@ -45,12 +45,10 @@ sub cleanrpmsrate { my ($rpmsrate, $output, $norpmsrate, $reprpms, $urpm) = @_; $norpmsrate ||= []; my $LOG; open $LOG, ">&STDERR"; - open my $A, $rpmsrate or print $LOG "ERROR: cannot open $rpmsrate\n"; my (@rpmsrate, %potloc); # must preread to get locale guessed packages # postfix is just used not to break the diff when checking if the result is correct - local $_; - while (<$A>) { + foreach (cat_or_die($rpmsrate)) { chomp; s/#.*//; #s/\s*$//; |