public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-13-g151f822
@ 2023-03-20 23:21 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-03-20 23:21 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=151f8222b58472cf2799f0a69a0057aad81d1f4b
commit 151f8222b58472cf2799f0a69a0057aad81d1f4b
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon Mar 20 23:19:00 2023 +0000
Add future texlive provides
Future work: make these regexes so we don't have to add them again in a
years time.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=de558c11a71f7fe0f39fb6526aa5b4d2f9a23c1a
commit de558c11a71f7fe0f39fb6526aa5b4d2f9a23c1a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Mar 15 21:40:30 2023 +0000
Make tests cover running reports as well
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=37f8f613938f0d6adcabc26b39e29a0b31540c3f
commit 37f8f613938f0d6adcabc26b39e29a0b31540c3f
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Mar 15 20:39:25 2023 +0000
Add a perl rebuild report
Diff:
---
calm/past_mistakes.py | 2 +
calm/reports.py | 59 ++++++++++++++++++++++++++++++
test/test_calm.py | 2 +
test/testdata/process_arch/htdocs.expected | 1 +
4 files changed, 64 insertions(+)
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index fed6c49..e102337 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -160,6 +160,8 @@ nonexistent_provides = [
'rxvt-unicode-X-debuginfo',
'xfce4-mixer-debuginfo',
'python3-dbus-debuginfo',
+ 'tl_2023',
+ 'tl_basic_2023',
]
# provides: which don't exist and packages which require them should be expired
diff --git a/calm/reports.py b/calm/reports.py
index 43b9030..20a167c 100644
--- a/calm/reports.py
+++ b/calm/reports.py
@@ -188,6 +188,64 @@ def deprecated(args, packages, reportsdir):
template('Deprecated shared library packages', body.getvalue(), f)
+# produce a report of packages which need rebuilding for latest perl major version
+#
+def perlrebuild(args, packages, reportsdir):
+ pr_list = []
+
+ arch = 'x86_64'
+ # XXX: look into how we can change this, after x86 is dropped
+
+ perl_package = packages[arch].get('perl_base', None)
+ perl_provide = None
+
+ if perl_package:
+ perl_bv = perl_package.best_version
+ perl_provide = perl_package.version_hints[perl_bv]['provides']
+
+ 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 re.match(r'perl\d+_\d+', d):
+ continue
+
+ if d == perl_provide:
+ continue
+
+ # requires an old perl 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 perl version provides: other than %s.</p>' % perl_provide, file=body)
+
+ print('<table class="grid">', file=body)
+ print('<tr><th>package</th><th>srcpackage</th><th>version</th><th>depends</th></tr>', file=body)
+
+ for pr in sorted(pr_list, key=lambda i: (i.depends, i.pn)):
+ print('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>' %
+ (linkify(pr.pn, pr.po), linkify(pr.spn, pr.spo), pr.bv, pr.depends), file=body)
+
+ print('</table>', file=body)
+
+ r = os.path.join(reportsdir, 'perl_rebuilds.html')
+ with utils.open_amifc(r) as f:
+ template('Packages needing rebuilds for latest perl', body.getvalue(), f)
+
+
#
def do_reports(args, packages):
if args.dryrun:
@@ -198,3 +256,4 @@ def do_reports(args, packages):
unmaintained(args, packages, reportsdir)
deprecated(args, packages, reportsdir)
+ perlrebuild(args, packages, reportsdir)
diff --git a/test/test_calm.py b/test/test_calm.py
index 473e235..11697dc 100755
--- a/test/test_calm.py
+++ b/test/test_calm.py
@@ -45,6 +45,7 @@ import calm.hint as hint
import calm.maintainers as maintainers
import calm.package as package
import calm.pkg2html as pkg2html
+import calm.reports as reports
import calm.uploads as uploads
from calm.version import SetupVersion
@@ -447,6 +448,7 @@ class CalmTest(unittest.TestCase):
pkg2html.update_package_listings(args, packages)
package.write_setup_ini(args, packages['x86_64'], 'x86_64')
+ reports.do_reports(args, packages)
with open(os.path.join(args.rel_area, 'setup.ini')) as inifile:
results = inifile.read()
diff --git a/test/testdata/process_arch/htdocs.expected b/test/testdata/process_arch/htdocs.expected
index 46462d6..46d9d7e 100644
--- a/test/testdata/process_arch/htdocs.expected
+++ b/test/testdata/process_arch/htdocs.expected
@@ -1,4 +1,5 @@
{'.': ['calm.db', 'packages.inc', 'src_packages.inc'],
+ 'reports': ['deprecated_so.html', 'perl_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-03-20 23:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 23:21 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-13-g151f822 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).