public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20221205-8-gaec1dcf
@ 2023-01-06 13:03 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-01-06 13:03 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=aec1dcf7af8df98df4c7ded84fd3a7a7750f9efd
commit aec1dcf7af8df98df4c7ded84fd3a7a7750f9efd
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Jul 10 15:54:47 2022 +0100
Allow package version to be marked as weakly retained
Allow a package version to be explicitly marked as weakly retained in
override.hint.
Ideally, we'd like something that let's us make a transaction that
removes a given source package and all install packages generated from
it, but we're not there yet...
Diff:
---
calm/hint.py | 1 +
calm/package.py | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/calm/hint.py b/calm/hint.py
index ddfcf74..6034c1d 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -93,6 +93,7 @@ hintkeys[override] = {
'keep-superseded-test': 'noval',
'disable-check': 'val',
'replace-versions': 'val',
+ 'noretain': 'val',
}
# valid categories
diff --git a/calm/package.py b/calm/package.py
index d3b5ab0..4538b8d 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1529,6 +1529,16 @@ def stale_packages(packages):
mark = dep_so_age_mark
+ elif 'noretain' in po.override_hints:
+ def noretain_hint_mark(v):
+ noretain_versions = po.override_hints.get('noretain', '').split()
+ if (v in noretain_versions) or ('all' in noretain_versions):
+ return Freshness.conditional
+ else:
+ return Freshness.fresh
+
+ mark = noretain_hint_mark
+
# mark any versions explicitly listed in the keep: override hint (unconditionally)
for v in po.override_hints.get('keep', '').split():
if v in po.versions():
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-06 13:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 13:03 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20221205-8-gaec1dcf Jon Turney
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).