public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-25-gdf6c091
@ 2023-05-02 14:19 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-05-02 14:19 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=df6c091c36d3406796f9c20f2386f59e4ab70518
commit df6c091c36d3406796f9c20f2386f59e4ab70518
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Apr 30 16:04:11 2023 +0100
Use regex matching for version provides:
This makes out-of-order uploading of users and providers of future
versions of these smoother.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=5fc54135fc49a4dd7718bfb76ea9733b0d1cee31
commit 5fc54135fc49a4dd7718bfb76ea9733b0d1cee31
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Thu Apr 27 20:11:52 2023 +0100
Add a ruby rebuilds report
Generalize the perl rebuild report logic to work for any version provide:
Diff:
---
calm/package.py | 2 +-
calm/past_mistakes.py | 26 ++++++++++------
calm/reports.py | 50 +++++++++++++++---------------
test/testdata/process_arch/htdocs.expected | 2 +-
4 files changed, 44 insertions(+), 36 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
diff --git a/calm/reports.py b/calm/reports.py
index f5405ae..1773840 100644
--- a/calm/reports.py
+++ b/calm/reports.py
@@ -205,31 +205,31 @@ def provides_rebuild(args, packages, reportfile, provide_package):
pp_provide = pp_package.version_hints[pp_bv]['provides']
pp_provide_base = re.sub(r'\d+$', '', pp_provide)
- for p in packages[arch]:
- po = packages[arch][p]
- bv = po.best_version
-
- depends = packages[arch][p].version_hints[bv]['depends'].split(', ')
- depends = [re.sub(r'(.*) +\(.*\)', r'\1', r) for r in depends]
-
- for d in depends:
- if not d.startswith(pp_provide_base):
- continue
-
- if d == pp_provide:
- continue
-
- # requires an old provide
- pr = types.SimpleNamespace()
- pr.pn = p
- pr.po = po
- pr.spn = po.srcpackage(bv)
- pr.spo = packages[arch][pr.spn]
- pr.depends = d
- pr.bv = bv
-
- pr_list.append(pr)
- break
+ for p in packages[arch]:
+ po = packages[arch][p]
+ bv = po.best_version
+
+ depends = packages[arch][p].version_hints[bv]['depends'].split(', ')
+ depends = [re.sub(r'(.*) +\(.*\)', r'\1', r) for r in depends]
+
+ for d in depends:
+ if not d.startswith(pp_provide_base):
+ continue
+
+ if d == pp_provide:
+ continue
+
+ # requires an old provide
+ pr = types.SimpleNamespace()
+ pr.pn = p
+ pr.po = po
+ pr.spn = po.srcpackage(bv)
+ pr.spo = packages[arch][pr.spn]
+ pr.depends = d
+ pr.bv = bv
+
+ pr_list.append(pr)
+ break
body = io.StringIO()
print(' <p>Packages whose latest version depends on a version provides: other than %s.</p>' % pp_provide, file=body)
diff --git a/test/testdata/process_arch/htdocs.expected b/test/testdata/process_arch/htdocs.expected
index 46d9d7e..55585d6 100644
--- a/test/testdata/process_arch/htdocs.expected
+++ b/test/testdata/process_arch/htdocs.expected
@@ -1,5 +1,5 @@
{'.': ['calm.db', 'packages.inc', 'src_packages.inc'],
- 'reports': ['deprecated_so.html', 'perl_rebuilds.html', 'unmaintained.html'],
+ 'reports': ['deprecated_so.html', 'perl_rebuilds.html', 'ruby_rebuilds.html', 'unmaintained.html'],
'summary': ['arc-src.html',
'arc.html',
'base-cygwin.html',
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-02 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 14:19 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-25-gdf6c091 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).