diff options
-rwxr-xr-x | calm/hint.py | 1 | ||||
-rwxr-xr-x | calm/package.py | 10 |
2 files changed, 11 insertions, 0 deletions
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(): |