From 99405741040a80ddd6d35dc982cf59cef171f609 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 15 Mar 2012 12:17:13 +0000 Subject: add comments --- pm/MGATools/rpmsrate.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pm/MGATools/rpmsrate.pm b/pm/MGATools/rpmsrate.pm index 06ed2a2..d6c611b 100644 --- a/pm/MGATools/rpmsrate.pm +++ b/pm/MGATools/rpmsrate.pm @@ -114,6 +114,7 @@ sub cleanrpmsrate { } elsif (my ($pg, $loc) = /^(.*)-([^-+]+)$/) { if ($potloc{$pg}) { my $pkg; + # try to lookup package in urpm first (if we got an $urpm and if media were parsed): $pkg = $o_urpm->{rpm}{$o_urpm->{rpmkey}{key}{$key}} if ref($o_urpm); # if package is not urpmi' synthesis, try to parse it directly: @@ -122,6 +123,7 @@ sub cleanrpmsrate { $pkg = $urpm2->{depslist}[$id]; } + # still nothing? bailout: if (!$pkg) { print "ERROR cleanrpmsrate: parse_rpm $dir/$rpm ($key) failed\n"; next; @@ -209,6 +211,7 @@ sub cleanrpmsrate { } } + # process localized packages (eg: man-pages-XX, hunspell-XX, firefox-XX, ...) if ($locale{$d} && $localized_pkg{$c}) { foreach (sort @{$locale{$d}}) { next if member($flat_path, @{$done{"$d-$_"}}); -- cgit v1.2.1