public inbox for
help / color / mirror / Atom feed
From: Jon TURNEY <>
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: <> (raw);h=51b7563055729cf836da85ccac7d731583c26392

commit 51b7563055729cf836da85ccac7d731583c26392
Author: Jon Turney <>
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).

 calm/ | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/calm/ b/calm/
index 2f318b2..0b3dec8 100755
--- a/calm/
+++ b/calm/
@@ -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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be 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).