public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210626-19-g3e7c381 Date: Fri, 11 Feb 2022 15:54:57 +0000 (GMT) [thread overview] Message-ID: <20220211155457.79CB63858D1E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=3e7c381a985a850284731a2b8f23d0368cff20a7 commit 3e7c381a985a850284731a2b8f23d0368cff20a7 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Tue Feb 8 14:25:19 2022 +0000 Drop computing and using 'prev' stability level It's not used for anything. Follow up to d8869d2e and 3cc08991. The whole stability level concept can be ripped out, since there's no way to set them anymore, so they are just implicit from version sorting. This stops retaining an additional version when 'keep-count: 1' is requested, but that is what's being asked for (only GeoIP-database and clamav-db-daily currently). https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=79aacb15e7691c5f5609f923891100b77048ec7f commit 79aacb15e7691c5f5609f923891100b77048ec7f Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Mon Feb 7 17:40:35 2022 +0000 Also sort by unchanged in 'unmaintained packages' report Diff: --- calm/package.py | 27 +++++++++++++++++++++------ calm/reports.py | 5 +++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/calm/package.py b/calm/package.py index 9fd734c..37aa58c 100755 --- a/calm/package.py +++ b/calm/package.py @@ -603,7 +603,7 @@ def validate_packages(args, packages): else: packages[p].not_for_output = False - levels = ['test', 'curr', 'prev'] + levels = ['test', 'curr'] # assign a version to each stability level packages[p].stability = defaultdict() @@ -1040,6 +1040,14 @@ def write_setup_ini(args, packages, arch): version = po.stability['curr'] vs.append((version, 'curr')) + # purely for compatibility with previous ordering, identify the + # 'prev' version (the non-test version before the current version), + # if it exists, so we can put it last. + prev_version = None + nontest_versions = [v for v in sorted(po.versions(), key=lambda v: SetupVersion(v), reverse=True) if 'test' not in po.version_hints.get(v, {})] + if len(nontest_versions) >= 2: + prev_version = nontest_versions[1] + # next put any other versions # # these [prev] or [test] sections are superseded by the final ones. @@ -1054,14 +1062,17 @@ def write_setup_ini(args, packages, arch): for version in sorted(versions, key=lambda v: SetupVersion(v), reverse=True): # skip over versions assigned to stability level: 'curr' has - # already be done, and 'prev' and 'test' will be done later + # already be done, and 'test' will be done later skip = False - for level in ['curr', 'prev', 'test']: + for level in ['curr', 'test']: if level in po.stability: if version == po.stability[level]: skip = True break + if version == prev_version: + skip = True + if skip: continue @@ -1072,13 +1083,17 @@ def write_setup_ini(args, packages, arch): level = "prev" vs.append((version, level)) - # finally, add 'prev' and 'test' versions + # add the 'prev' version + if prev_version: + vs.append((prev_version, "prev")) + + # finally, add 'test' version # # because setup processes version sections in order, these supersede # any previous [prev] and [test] sections (hopefully). i.e. the # version in the final [test] section is the one selected when test # packages are requested. - for level in ['prev', 'test']: + for level in ['test']: if level in po.stability: version = po.stability[level] vs.append((version, level)) @@ -1359,7 +1374,7 @@ def mark_package_fresh(packages, p, v): def stale_packages(packages): for pn, po in packages.items(): # mark any versions used by stability levels as fresh - for level in ['curr', 'prev']: + for level in ['curr']: if level in po.stability: v = po.stability[level] mark_package_fresh(packages, pn, v) diff --git a/calm/reports.py b/calm/reports.py index 5d18cdd..834371c 100644 --- a/calm/reports.py +++ b/calm/reports.py @@ -105,7 +105,8 @@ def unmaintained(args, packages, reportsdir): # 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... - if SetupVersion(v)._V == SetupVersion(up.upstream_v)._V: + up.unchanged = (SetupVersion(v)._V == SetupVersion(up.upstream_v)._V) + if up.unchanged: up.upstream_v += " (unchanged)" um_list.append(up) @@ -116,7 +117,7 @@ def unmaintained(args, packages, reportsdir): 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) - for up in sorted(um_list, key=lambda i: (i.rdepends + i.build_rdepends, i.ts), reverse=True): + 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)
reply other threads:[~2022-02-11 15:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220211155457.79CB63858D1E@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).