Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-01-05 19:13:46 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-01-07 20:05:19 +0300
commitb0ea56b7f82ba930d16304e0860f444689bd7d69 (patch)
tree851982b8f618a653babad23cb3606817191c136b
parent31819b5ed1b2523cb272a1474cd00ce6bddca33c (diff)
Allow regex matching for old_style_obsolete_by data
-rwxr-xr-xcalm/package.py8
-rw-r--r--calm/past_mistakes.py2
2 files changed, 8 insertions, 2 deletions
diff --git a/calm/package.py b/calm/package.py
index d8e9432..c2bab34 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -605,9 +605,13 @@ def upgrade_oldstyle_obsoletes(packages):
requires = packages[p].version_hints[vr].get('depends', '').split(', ')
requires = [re.sub(r'(.*) +\(.*\)', r'\1', r) for r in requires]
- if p in past_mistakes.old_style_obsolete_by:
- o = past_mistakes.old_style_obsolete_by[p]
+ o = None
+ for oso_re, oso_o in past_mistakes.old_style_obsolete_by.items():
+ if re.match(r'^' + oso_re + r'$', p):
+ o = oso_o
+ break
+ if o is not None:
# empty replacement means "ignore"
if not o:
continue
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index 6c38e36..08885ec 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -188,6 +188,8 @@ old_style_obsolete_by = {
'vim-python3': 'vim',
'vim-ruby': 'vim',
# (An empty replacement means "don't apply this heuristic")
+ # we have other plans for 'python3-*' packages, they will become virtuals
+ 'python3-.*': '',
# these packages probably should be marked as self-destruct?
'mate-utils': '',
'texlive-collection-htmlxml': '',