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. 20230209-104-g1374472 Date: Thu, 25 Apr 2024 14:07:34 +0000 (GMT) [thread overview] Message-ID: <20240425140734.40082384642D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=1374472295d04be7b10bdc692db0f0d69b833447 commit 1374472295d04be7b10bdc692db0f0d69b833447 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Wed Apr 24 13:20:39 2024 +0100 Clarify missing obsoletes reminder Make it clearer that if calm has to provide missing obsoletes, that is a packaging defect. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=e1c2bc5d588edf197a18495578ba251ccef51e9f commit e1c2bc5d588edf197a18495578ba251ccef51e9f Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Sun Jun 19 13:11:44 2022 +0100 Don't retain obsolete packages Don't retain obsolete packages over a certain age threshold (when they are effectively just adding an obsolete: to another package). This is safe, as commit 17dc61e9 (persisting missing_obsoletes) ensures that if the obsoletion was old-style (and thus only recorded in the obsoleted package, with the new-style obsoletes: hint in the obsoleteing package being synthesized by commit eca3a88d), the fact of that obsoletion isn't forgotten once the obsolete package itself is removed. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=4ebc8832703ad5578b99690256d48089f319d3da commit 4ebc8832703ad5578b99690256d48089f319d3da Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Wed Feb 23 23:39:23 2022 +0000 Misspellings re-uploaded since last fixed Diff: --- calm/hint.py | 2 ++ calm/package.py | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/calm/hint.py b/calm/hint.py index 680e3f7..7e9f66b 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -401,6 +401,8 @@ words = [ (' examing ', ' examining '), (' extremly ', ' extremely '), (' interm ', ' interim '), + (' immitation ', ' imitation '), + (' nlike ', ' Unlike '), (' procesors ', ' processors '), (' utilitzed ', ' utilized '), (' utilties ', ' utilities '), diff --git a/calm/package.py b/calm/package.py index 64587e5..712f9b5 100755 --- a/calm/package.py +++ b/calm/package.py @@ -834,6 +834,7 @@ def validate_packages(args, packages, valid_provides_extra=None, missing_obsolet obsoletes.append(n) packages[p].version_hints[v]['obsoletes'] = obsoletes logging.info("added 'obsoletes: %s' to package '%s' version '%s'" % (n, p, v)) + logging.info("this should be in fixed in the cygport packaging") # recurse so we don't drop transitive missing obsoletes if n in mo: @@ -1648,7 +1649,7 @@ def mark_package_fresh(packages, p, v, mark=Freshness.fresh): # helper function evaluate if package needs marking for conditional retention # -def mark_fn(packages, po, v, certain_age, vault_requests): +def mark_fn(packages, po, v, certain_age, obs_threshold, vault_requests): pn = po.name bv = po.best_version @@ -1676,6 +1677,17 @@ def mark_fn(packages, po, v, certain_age, vault_requests): 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, True) + # - package is an old-style obsoletion, over a certain age, and not marked + # as self-destruct + # + if '_obsolete' in po.version_hints[v]['category']: + mtime = po.tar(v).mtime + if mtime < obs_threshold: + provides = po.version_hints[v].get('provides', []) + if '_self-destruct' not in provides: + logging.debug("obsolete package '%s' version '%s' mtime '%s' is over cut-off age" % (pn, v, time.strftime("%F %T %Z", time.localtime(mtime)))) + return (Freshness.conditional, False) + # - if package depends on anything in expired_provides # requires = po.version_hints[v].get('depends', []) @@ -1700,12 +1712,16 @@ def mark_fn(packages, po, v, certain_age, vault_requests): # SO_AGE_THRESHOLD_YEARS = 5 +OBSOLETE_AGE_THRESHOLD_YEARS = 10 def stale_packages(packages, vault_requests): certain_age = time.time() - (SO_AGE_THRESHOLD_YEARS * 365.25 * 24 * 60 * 60) logging.debug("cut-off date for soversion package to be considered old is %s" % (time.strftime("%F %T %Z", time.localtime(certain_age)))) + obs_threshold = time.time() - (OBSOLETE_AGE_THRESHOLD_YEARS * 365.25 * 24 * 60 * 60) + logging.debug("cut-off date for obsolete package to be considered old is %s" % (time.strftime("%F %T %Z", time.localtime(obs_threshold)))) + # mark install packages for freshness for pn, po in packages.items(): # mark as fresh any versions explicitly listed in the keep: override @@ -1763,7 +1779,7 @@ def stale_packages(packages, vault_requests): # overwrite with 'conditional' package retention mark if it meets # various criteria for v in sorted(po.versions(), key=lambda v: SetupVersion(v)): - (mark, others) = mark_fn(packages, po, v, certain_age, vault_requests) + (mark, others) = mark_fn(packages, po, v, certain_age, obs_threshold, vault_requests) if mark != Freshness.fresh: mark_package_fresh(packages, pn, v, mark)
reply other threads:[~2024-04-25 14: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=20240425140734.40082384642D@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).