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-04-30 18:04:11 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-05-02 17:17:13 +0300
commitdf6c091c36d3406796f9c20f2386f59e4ab70518 (patch)
tree18b6b465555cebb0bc776ec4710a7e53574a5874
parent5fc54135fc49a4dd7718bfb76ea9733b0d1cee31 (diff)
Use regex matching for version provides:
This makes out-of-order uploading of users and providers of future versions of these smoother.
-rwxr-xr-xcalm/package.py2
-rw-r--r--calm/past_mistakes.py26
2 files changed, 18 insertions, 10 deletions
diff --git a/calm/package.py b/calm/package.py
index 9bcaf04..f60c238 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -729,7 +729,7 @@ def validate_packages(args, packages, valid_provides_extra=None, missing_obsolet
# all packages listed in a hint must exist (unless the
# disable-check option says that's ok)
- if (r not in valid) and (r not in past_mistakes.nonexistent_provides + past_mistakes.expired_provides):
+ if (r not in valid) and (r not in past_mistakes.expired_provides) and (not any(re.match(nep, r) for nep in past_mistakes.nonexistent_provides)):
if okmissing not in getattr(args, 'disable_check', []):
logging.error("package '%s' version '%s' %s: '%s', but nothing satisfies that" % (p, v, c, r))
error = True
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index e1b90e1..b09fa00 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -152,19 +152,27 @@ missing_obsolete = {
'xfig-debuginfo': ['transfig-debuginfo'], # contain conflicting files
}
-# provides: which don't exist
-nonexistent_provides = [
- '_windows',
- 'perl5_026',
+# historical provides
+#
+# something obsoletes these, but they were removed before we started remembering
+# all historic_package_names
+historical_provides = [
'rdiff-debuginfo',
'rxvt-unicode-X-debuginfo',
'xfce4-mixer-debuginfo',
'python3-dbus-debuginfo',
- 'tl_2023',
- 'tl_basic_2023',
- 'ruby_23',
- 'ruby_22',
- 'ruby_20',
+]
+
+# provides: which don't exist
+#
+# we use regex patterns to match version provides which might have been expired,
+# or not uploaded yet.
+nonexistent_provides = historical_provides + [
+ '_windows',
+ r'perl5_\d+',
+ r'ruby_\d+',
+ r'tl_\d+',
+ r'tl_basic_\d+',
]
# provides: which don't exist and packages which require them should be expired