From cc8b067ef1db3b2461a44403e4c79c6a2014e7c6 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 17 Oct 2026 06:27:16 -0400 Subject: Don't report another maintainer's project (e.g. I maintain foo-legacy, you have foo, repology treats them as the same project). --- greypool | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/greypool b/greypool index 181db2d..fc2ba8b 100755 --- a/greypool +++ b/greypool @@ -307,7 +307,9 @@ sub parse_html_colors { } sub parse_mask { - (my $pkg, @versions) = split /\s+/, $_[0]; + my $pkg; + my @versions; + ($pkg, @versions) = split /\s+/, $_[0]; fatal "$config_file:$.: no versions listed for 'mask'" unless @versions; $masked{$pkg} = \@versions if @versions; } @@ -409,8 +411,8 @@ sub parse_file { # noscheme, incorrect, untrusted, ignored. } for my $hr (@{$arr}) { - my($status, $r_repo, $name, $version) = - @$hr{qw/status repo visiblename version/}; + my($status, $r_repo, $name, $version, $maint) = + @$hr{qw/status repo visiblename version maintainers/}; if($r_repo eq $repo && $status eq 'outdated') { my $item = { @@ -418,8 +420,15 @@ sub parse_file { projname => $proj, oldver => $version, newver => $newest}; - $report{$name} = $item unless ignored_or_masked($item); - last; + + # we have to check the maintainer because e.g. 2 different + # people maintain libxm++3 and libml++5, or qt4 and qt6. + # or "foo" and "foo-legacy" + # repology considers these the same project. + if(@$maint[0] eq $email) { + $report{$name} = $item unless ignored_or_masked($item); + last; + } } } } @@ -432,12 +441,14 @@ sub ignored_or_masked { my $i = shift; for(qw/name projname/) { + #warn "checking ignore: $i->{$_}"; return 1 if $ignore{$i->{$_}}; } my $maskvers = $masked{$i->{name}}; $maskvers = $masked{$i->{projname}} unless $maskvers; return unless $maskvers; + #warn "checking masked: $i->{name} $i->{newver}, " . join ",", @$maskvers; return grep { $i->{newver} eq $_ } @$maskvers; } -- cgit v1.2.3