Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-12-13 01:01:29 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-12-13 21:32:18 +0300
commitc48d8a653378e405bc1083e33b7ea9991b8f6a04 (patch)
treeeec82acaa3dd4baac2c8dadfef78772b94aef449 /calm/reports.py
parent23cbaac193afe222962fe12b8a5710973678b363 (diff)
Also sort by package "importance" in unmaintained packages report
Diffstat (limited to 'calm/reports.py')
-rw-r--r--calm/reports.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/calm/reports.py b/calm/reports.py
index 6fa570e..d56eb89 100644
--- a/calm/reports.py
+++ b/calm/reports.py
@@ -112,6 +112,7 @@ def unmaintained(args, packages, reportlist):
up.ts = po.tar(v).mtime
up.rdepends = len(rdepends)
up.build_rdepends = len(build_rdepends)
+ up.importance = po.importance
# some packages are mature. If 'v' is still latest upstream version,
# then maybe we don't need to worry about this package quite as much...
@@ -125,11 +126,11 @@ def unmaintained(args, packages, reportlist):
print('<p>Packages without a maintainer.</p>', file=body)
print('<table class="grid">', file=body)
- print('<tr><th>last updated</th><th>package</th><th>version</th><th>upstream version</th><th>rdepends</th><th>build_rdepends</th></tr>', file=body)
+ print('<tr><th>last updated</th><th>package</th><th>version</th><th>upstream version</th><th>rdepends</th><th>build_rdepends</th><th>importance</th></tr>', file=body)
- for up in sorted(um_list, key=lambda i: (i.rdepends + i.build_rdepends, not i.unchanged, i.ts), reverse=True):
- print('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>' %
- (pkg2html.tsformat(up.ts), linkify(up.pn, up.po), up.v, up.upstream_v, up.rdepends, up.build_rdepends), file=body)
+ for up in sorted(um_list, key=lambda i: (-i.importance, i.rdepends + i.build_rdepends, not i.unchanged, i.ts), reverse=True):
+ print('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>' %
+ (pkg2html.tsformat(up.ts), linkify(up.pn, up.po), up.v, up.upstream_v, up.rdepends, up.build_rdepends, up.importance), file=body)
print('</table>', file=body)