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-45-g51b7563 Date: Sun, 29 May 2022 22:07:25 +0000 (GMT) [thread overview] Message-ID: <20220529220726.2FAA038293F3@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=51b7563055729cf836da85ccac7d731583c26392 commit 51b7563055729cf836da85ccac7d731583c26392 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Tue May 24 17:40:14 2022 +0100 Improve deprecated soversion expiry Apply the age criterion to the mtime of the version under consideration, not of best_version (probably the newest version). Diff: --- calm/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/calm/package.py b/calm/package.py index 2f318b2..0b3dec8 100755 --- a/calm/package.py +++ b/calm/package.py @@ -1348,6 +1348,9 @@ class Freshness(IntEnum): def mark_package_fresh(packages, p, v, mark=Freshness.fresh): + if callable(mark): + mark = mark(v) + packages[p].tar(v).fresh = mark @@ -1384,10 +1387,16 @@ def stale_packages(packages): if (len(po.rdepends) == 0) and re.match(common_constants.SOVERSION_PACKAGE_RE, pn): bv = po.best_version es = po.version_hints[bv].get('external-source', None) - mtime = po.tar(bv).mtime - if es and (packages[es].best_version != bv) and (mtime < certain_age): - logging.debug("deprecated soversion package '%s' mtime '%s' is over cut-off age" % (pn, time.strftime("%F %T %Z", time.localtime(mtime)))) - mark = Freshness.conditional + if es and (packages[es].best_version != bv): + def dep_so_age_mark(v): + mtime = po.tar(v).mtime + if mtime < certain_age: + logging.debug("deprecated soversion package '%s' version '%s' mtime '%s' is over cut-off age" % (pn, v, time.strftime("%F %T %Z", time.localtime(mtime)))) + return Freshness.conditional + else: + return Freshness.fresh + + mark = dep_so_age_mark # mark any versions explicitly listed in the keep: override hint (unconditionally) for v in po.override_hints.get('keep', '').split():
reply other threads:[~2022-05-29 22:07 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=20220529220726.2FAA038293F3@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).