[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-115-g3fbed76
Jon Turney
jturney@sourceware.org
Wed Jun 19 13:33:58 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=3fbed765bb6c8433b027fe39419f5ab88f703f1e
commit 3fbed765bb6c8433b027fe39419f5ab88f703f1e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Tue Jun 18 15:13:41 2024 +0100
Wind the obsolete package exipry threshold age forward
Wind the obsolete package exipry threshold age forward, and update tests
appropriately.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=954c34359946be51947a5475dea3064352ce6a5d
commit 954c34359946be51947a5475dea3064352ce6a5d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Jun 2 17:37:11 2024 +0100
Improve mail inactive maintainers tool
Diff:
---
calm/mail-inactive-maintainers.py | 15 +++++++++++----
calm/package.py | 2 +-
calm/past_mistakes.py | 2 +-
test/testdata/conflict/rel_area.expected | 8 +-------
test/testdata/conflict/vault.expected | 4 ++++
test/testdata/process_arch/htdocs.expected | 4 +---
test/testdata/process_arch/packages.json.expected | 23 +----------------------
test/testdata/process_arch/rel_area.expected | 8 +-------
test/testdata/process_arch/setup.ini.expected | 6 ------
test/testdata/process_arch/vault.expected | 4 ++++
test/testdata/upload_bad_auth/rel_area.expected | 8 +-------
test/testdata/upload_bad_auth/vault.expected | 4 ++++
12 files changed, 30 insertions(+), 58 deletions(-)
diff --git a/calm/mail-inactive-maintainers.py b/calm/mail-inactive-maintainers.py
index 8e692a9..bb62fbd 100644
--- a/calm/mail-inactive-maintainers.py
+++ b/calm/mail-inactive-maintainers.py
@@ -62,15 +62,19 @@ For further assistance, please contact us via email at <cygwin-apps@cygwin.com>
def main(args):
- packages = {}
+ logging.getLogger().setLevel(logging.WARNING)
+ packages = {}
for arch in common_constants.ARCHES:
logging.debug("reading existing packages for arch %s" % (arch))
packages[arch], _ = package.read_packages(args.relarea, arch)
activity_list = reports.maintainer_activity(args, packages)
+ logging.getLogger().setLevel(logging.INFO)
+
threshold = time.time() - MAINTAINER_ACTIVITY_THRESHOLD_YEARS * 365.25 * 24 * 60 * 60
+ logging.info('threshold date %s', pkg2html.tsformat(threshold))
for a in activity_list:
last_activity = max(a.last_seen, a.last_package)
@@ -89,8 +93,11 @@ def main(args):
msg = template.format(a.name, pkg2html.tsformat(last_activity), '\n'.join(pkg_list))
- msg_id = utils.sendmail(hdr, msg)
- logging.info('%s', msg_id)
+ if not args.dryrun:
+ msg_id = utils.sendmail(hdr, msg)
+ logging.info('%s', msg_id)
+ else:
+ print(msg)
if __name__ == "__main__":
@@ -102,10 +109,10 @@ if __name__ == "__main__":
parser.add_argument('--homedir', action='store', metavar='DIR', help="maintainer home directory (default: " + homedir_default + ")", default=homedir_default)
parser.add_argument('--pkglist', action='store', metavar='FILE', help="package maintainer list (default: " + pkglist_default + ")", default=pkglist_default)
parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='relarea')
+ parser.add_argument('-n', '--dry-run', action='store_true', dest='dryrun', help="don't send mails")
(args) = parser.parse_args()
- logging.getLogger().setLevel(logging.INFO)
logging.basicConfig(format=os.path.basename(sys.argv[0]) + ': %(message)s')
main(args)
diff --git a/calm/package.py b/calm/package.py
index 03afeca..83deafe 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1720,7 +1720,7 @@ def mark_fn(packages, po, v, certain_age, obs_threshold, vault_requests):
#
SO_AGE_THRESHOLD_YEARS = 5
-OBSOLETE_AGE_THRESHOLD_YEARS = 8
+OBSOLETE_AGE_THRESHOLD_YEARS = 7
def stale_packages(packages, vault_requests):
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index 338095f..9304161 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -295,9 +295,9 @@ old_style_obsolete_by = {
# these packages probably should be marked as self-destruct?
'mate-utils': '',
'python-twisted-debuginfo': '',
- 'texlive-collection-htmlxml': '',
'vte2.91': '',
# self-destruct, or need to start to exist
'cron-debuginfo': '',
+ 'texlive-collection-htmlxml': '',
'w32api': '',
}
diff --git a/test/testdata/conflict/rel_area.expected b/test/testdata/conflict/rel_area.expected
index ce4225b..7ae1ec3 100644
--- a/test/testdata/conflict/rel_area.expected
+++ b/test/testdata/conflict/rel_area.expected
@@ -153,13 +153,7 @@
'x86_64/release/proj': ['proj-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj-devel': ['libproj-devel-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj1': ['libproj1-4.8.0-1.hint', 'sha512.sum'],
- 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
- 'rpm-doc-4.1-2-src.tar.bz2',
- 'rpm-doc-4.1-2.hint',
- 'rpm-doc-4.1-2.tar.bz2',
- 'rpm-doc-999-1.hint',
- 'rpm-doc-999-1.tar.bz2',
- 'sha512.sum'],
+ 'x86_64/release/rpm-doc': ['rpm-doc-999-1.hint', 'rpm-doc-999-1.tar.bz2', 'sha512.sum'],
'x86_64/release/splint': ['sha512.sum', 'splint-3.1.2-1.hint'],
'x86_64/release/staleversion': ['override.hint',
'sha512.sum',
diff --git a/test/testdata/conflict/vault.expected b/test/testdata/conflict/vault.expected
index edf2c65..8d3f6eb 100644
--- a/test/testdata/conflict/vault.expected
+++ b/test/testdata/conflict/vault.expected
@@ -1,6 +1,10 @@
{'.': [],
'x86_64': [],
'x86_64/release': [],
+ 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
+ 'rpm-doc-4.1-2-src.tar.bz2',
+ 'rpm-doc-4.1-2.hint',
+ 'rpm-doc-4.1-2.tar.bz2'],
'x86_64/release/staleversion': ['staleversion-240-1-src.hint',
'staleversion-240-1-src.tar.xz',
'staleversion-240-1.hint',
diff --git a/test/testdata/process_arch/htdocs.expected b/test/testdata/process_arch/htdocs.expected
index cb93982..57c3bc9 100644
--- a/test/testdata/process_arch/htdocs.expected
+++ b/test/testdata/process_arch/htdocs.expected
@@ -32,7 +32,6 @@
'per-version.html',
'perl-Net-SMTP-SSL-src.html',
'perl-Net-SMTP-SSL.html',
- 'rpm-doc-src.html',
'rpm-doc.html',
'staleversion-src.html',
'staleversion.html',
@@ -82,8 +81,7 @@
'perl-Net-SMTP-SSL-1.02-1-src',
'perl-Net-SMTP-SSL-1.03-1-src',
'perl-Net-SMTP-SSL-1.03-2-src'],
- 'x86_64/rpm-doc': ['.htaccess', 'rpm-doc-4.1-2', 'rpm-doc-999-1'],
- 'x86_64/rpm-doc-src': ['.htaccess', 'rpm-doc-4.1-2-src'],
+ 'x86_64/rpm-doc': ['.htaccess', 'rpm-doc-999-1'],
'x86_64/staleversion': ['.htaccess', 'staleversion-243-0', 'staleversion-250-0', 'staleversion-260-0'],
'x86_64/staleversion-src': ['.htaccess', 'staleversion-243-0-src', 'staleversion-250-0-src', 'staleversion-260-0-src'],
'x86_64/test-c': ['.htaccess', 'test-c-1.0-1'],
diff --git a/test/testdata/process_arch/packages.json.expected b/test/testdata/process_arch/packages.json.expected
index bc50d46..94c9208 100644
--- a/test/testdata/process_arch/packages.json.expected
+++ b/test/testdata/process_arch/packages.json.expected
@@ -1,5 +1,5 @@
('{\n'
- ' "num_packages": 17,\n'
+ ' "num_packages": 16,\n'
' "packages": [\n'
' {\n'
' "arches": [\n'
@@ -314,27 +314,6 @@
' "arches": [\n'
' "x86_64"\n'
' ],\n'
- ' "name": "rpm-doc",\n'
- ' "subpackages": [\n'
- ' {\n'
- ' "categories": [\n'
- ' "_obsolete"\n'
- ' ],\n'
- ' "name": "rpm-doc"\n'
- ' }\n'
- ' ],\n'
- ' "summary": "Obsolete package for RPM package management system manual pages (extra text to so repr is '
- 'not one line)",\n'
- ' "versions": {\n'
- ' "stable": [\n'
- ' "4.1-2"\n'
- ' ]\n'
- ' }\n'
- ' },\n'
- ' {\n'
- ' "arches": [\n'
- ' "x86_64"\n'
- ' ],\n'
' "maintainers": [\n'
' "Blooey McFooey"\n'
' ],\n'
diff --git a/test/testdata/process_arch/rel_area.expected b/test/testdata/process_arch/rel_area.expected
index 723abdd..71ebc33 100644
--- a/test/testdata/process_arch/rel_area.expected
+++ b/test/testdata/process_arch/rel_area.expected
@@ -157,13 +157,7 @@
'x86_64/release/proj': ['proj-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj-devel': ['libproj-devel-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj1': ['libproj1-4.8.0-1.hint', 'sha512.sum'],
- 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
- 'rpm-doc-4.1-2-src.tar.bz2',
- 'rpm-doc-4.1-2.hint',
- 'rpm-doc-4.1-2.tar.bz2',
- 'rpm-doc-999-1.hint',
- 'rpm-doc-999-1.tar.bz2',
- 'sha512.sum'],
+ 'x86_64/release/rpm-doc': ['rpm-doc-999-1.hint', 'rpm-doc-999-1.tar.bz2', 'sha512.sum'],
'x86_64/release/splint': ['sha512.sum', 'splint-3.1.2-1.hint'],
'x86_64/release/staleversion': ['override.hint',
'sha512.sum',
diff --git a/test/testdata/process_arch/setup.ini.expected b/test/testdata/process_arch/setup.ini.expected
index eace177..0e9156c 100644
--- a/test/testdata/process_arch/setup.ini.expected
+++ b/test/testdata/process_arch/setup.ini.expected
@@ -288,12 +288,6 @@
'version: 999-1\n'
'install: x86_64/release/rpm-doc/rpm-doc-999-1.tar.bz2 42 '
'28c70b843fe01d90a3eeab4a3617551d236cd0b7d69668d1b1b6c8b14a9fd050e4039c192894c93bdf31575771c58c1fea2a41c24c8da22d10080d8b032b6369\n'
- '[prev]\n'
- 'version: 4.1-2\n'
- 'install: x86_64/release/rpm-doc/rpm-doc-4.1-2.tar.bz2 50941 '
- '7cc9db802364252e3206ce9f75c8ca53813d8308a22a425b50ef695dd8e51568740b06739d3aa3399a83fb3d3e1345ab7e2ad03a1e9d47c02dded3363bf4f493\n'
- 'source: x86_64/release/rpm-doc/rpm-doc-4.1-2-src.tar.bz2 188 '
- 'a4ee9121cfff2ccd5b4d84ffd18d2cff0ea071cef3c5416b8825d7b7f7cff8a8873c71832f3f3cb8742d004f9db34e9d160ad613b5df839723a3f986f0901402\n'
'\n'
'@ staleversion\n'
'sdesc: "Test package for stale version removal"\n'
diff --git a/test/testdata/process_arch/vault.expected b/test/testdata/process_arch/vault.expected
index 764e804..66a0789 100644
--- a/test/testdata/process_arch/vault.expected
+++ b/test/testdata/process_arch/vault.expected
@@ -7,6 +7,10 @@
'perl-Net-SMTP-SSL-1.01-1.tar.xz'],
'x86_64': [],
'x86_64/release': [],
+ 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
+ 'rpm-doc-4.1-2-src.tar.bz2',
+ 'rpm-doc-4.1-2.hint',
+ 'rpm-doc-4.1-2.tar.bz2'],
'x86_64/release/staleversion': ['staleversion-240-1-src.hint',
'staleversion-240-1-src.tar.xz',
'staleversion-240-1.hint',
diff --git a/test/testdata/upload_bad_auth/rel_area.expected b/test/testdata/upload_bad_auth/rel_area.expected
index ce4225b..7ae1ec3 100644
--- a/test/testdata/upload_bad_auth/rel_area.expected
+++ b/test/testdata/upload_bad_auth/rel_area.expected
@@ -153,13 +153,7 @@
'x86_64/release/proj': ['proj-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj-devel': ['libproj-devel-4.8.0-1.hint', 'sha512.sum'],
'x86_64/release/proj/libproj1': ['libproj1-4.8.0-1.hint', 'sha512.sum'],
- 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
- 'rpm-doc-4.1-2-src.tar.bz2',
- 'rpm-doc-4.1-2.hint',
- 'rpm-doc-4.1-2.tar.bz2',
- 'rpm-doc-999-1.hint',
- 'rpm-doc-999-1.tar.bz2',
- 'sha512.sum'],
+ 'x86_64/release/rpm-doc': ['rpm-doc-999-1.hint', 'rpm-doc-999-1.tar.bz2', 'sha512.sum'],
'x86_64/release/splint': ['sha512.sum', 'splint-3.1.2-1.hint'],
'x86_64/release/staleversion': ['override.hint',
'sha512.sum',
diff --git a/test/testdata/upload_bad_auth/vault.expected b/test/testdata/upload_bad_auth/vault.expected
index edf2c65..8d3f6eb 100644
--- a/test/testdata/upload_bad_auth/vault.expected
+++ b/test/testdata/upload_bad_auth/vault.expected
@@ -1,6 +1,10 @@
{'.': [],
'x86_64': [],
'x86_64/release': [],
+ 'x86_64/release/rpm-doc': ['rpm-doc-4.1-2-src.hint',
+ 'rpm-doc-4.1-2-src.tar.bz2',
+ 'rpm-doc-4.1-2.hint',
+ 'rpm-doc-4.1-2.tar.bz2'],
'x86_64/release/staleversion': ['staleversion-240-1-src.hint',
'staleversion-240-1-src.tar.xz',
'staleversion-240-1.hint',
More information about the Cygwin-apps-cvs
mailing list