From cda9f0512545bf5374cbed851e58140537a38f39 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 14 Oct 2023 21:34:10 +0100 Subject: Expire python2 modules For the first time, we are expiring obsolete packages just because they are obsolete, so it is time for the previous commit, to ensure we retain any obsolete: hints they might have caused to be generated. --- calm/package.py | 9 +++++---- calm/past_mistakes.py | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/calm/package.py b/calm/package.py index 9f50d6f..e45874c 100755 --- a/calm/package.py +++ b/calm/package.py @@ -584,7 +584,7 @@ def sort_key(k): # generate a record to add an obsoletes: header to the replacement package. # -OBSOLETE_CONVERT_THRESHOLD_YEARS = 20 +OBSOLETE_CONVERT_THRESHOLD_YEARS = 2 def upgrade_oldstyle_obsoletes(packages, missing_obsolete): @@ -1568,9 +1568,10 @@ def mark_fn(packages, po, v, certain_age, vault_requests): # - if package depends on anything in expired_provides # requires = po.version_hints[v].get('depends', '').split(', ') - if any(ep in requires for ep in past_mistakes.expired_provides): - logging.info("package '%s' version '%s' not retained as it requires a provide known to be expired" % (pn, v)) - return Freshness.conditional + if re.match(r'^python(|2|27)-', pn): + if any(ep in requires for ep in past_mistakes.expired_provides) or po.obsolete: + logging.info("package '%s' version '%s' not retained as it requires a provide known to be expired" % (pn, v)) + return Freshness.conditional # - explicitly marked as 'noretain' # diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py index 6561fde..13dfd50 100644 --- a/calm/past_mistakes.py +++ b/calm/past_mistakes.py @@ -171,6 +171,8 @@ nonexistent_provides = historical_provides + [ 'python2', 'python2-devel', 'python27', + 'python-pygments', + 'python-lxml', '_windows', r'perl5_\d+', r'ruby_\d+', @@ -180,6 +182,8 @@ nonexistent_provides = historical_provides + [ # provides: which don't exist and packages which require them should be expired expired_provides = [ + 'python2', + 'python27', ] # empty source packages -- cgit v1.2.3