aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-10-17 06:27:16 -0400
committerB. Watson <urchlay@slackware.uk>2026-10-17 06:27:16 -0400
commitcc8b067ef1db3b2461a44403e4c79c6a2014e7c6 (patch)
tree63d57751eab86461ce3558e7a9fe8d34b0d20c84
parentf5d3c39b36e95df2d64ef7fca84aa67ba7dd03c9 (diff)
downloadgreypool-cc8b067ef1db3b2461a44403e4c79c6a2014e7c6.tar.gz
Don't report another maintainer's project (e.g. I maintain foo-legacy, you have foo, repology treats them as the same project).
-rwxr-xr-xgreypool21
1 files 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;
}