Improve maintainer last activity estimate
authorJon Turney <jon.turney@dronecode.org.uk>
Fri, 6 Jun 2025 12:23:49 +0000 (13:23 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 6 Jun 2025 12:27:21 +0000 (13:27 +0100)
Ignore timestamp of co-maintained packages when estimating last date of
maintainer activity.  This helps the inactive mainainter tool not to be
so easily fooled by co-maintainership.

(This is still not perfect, but... well, eventually we'll be in a world
where we have ssh activity timestamps for all maintainers and don't have
to resort to guessing based on package timestamps)

calm/reports.py

index cd772fe0bee2eb672ebe4fc3a1ccdea46a0da966..d59e01f60367301d05050f98fdb8bbe6b6731663 100644 (file)
@@ -300,8 +300,7 @@ def maintainer_activity(args, packages):
         a.last_seen = m.last_seen
 
         # because last_seen hasn't been collected for very long, we also try to
-        # estimate by looking at packages (this isn't very good as it gets
-        # confused by co-mainainted packages)
+        # estimate last activity by looking at packages
         count = 0
         mtime = 0
         pkgs = []
@@ -318,6 +317,11 @@ def maintainer_activity(args, packages):
             if po:
                 pkgs.append(pn)
 
+                # ignore timestamp of co-maintained packages, because we don't
+                # know who is responsible for the update
+                if len(p.maintainers()) > 1:
+                    continue
+
                 for v in po.versions():
                     if po.tar(v).mtime > mtime:
                         mtime = po.tar(v).mtime
@@ -327,7 +331,6 @@ def maintainer_activity(args, packages):
         if count == 0:
             continue
 
-        a.count = count
         a.pkgs = pkgs
         a.last_package = mtime
 
This page took 0.029022 seconds and 5 git commands to generate.