This is the mail archive of the
cygwin-apps-cvs
mailing list for the cygwin-apps project.
[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-96-g3e00aa0
- From: jturney at sourceware dot org
- To: cygwin-apps-cvs at sourceware dot org
- Date: 6 Oct 2017 11:35:03 -0000
- Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-96-g3e00aa0
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=3e00aa05586a70468332fe280678ed6a2f6ea9c4
commit 3e00aa05586a70468332fe280678ed6a2f6ea9c4
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Oct 6 12:29:04 2017 +0100
Fix validate_package_maintainers to handle absent category hints.
When an old source-only package (which has a .hint containing just skip:) is
changed to an installable package, a category doesn't exist for all
versions.
Traceback (most recent call last):
File "./calm/calm.py", line 508, in do_daemon
state.packages = process_uploads(args, state)
File "./calm/calm.py", line 192, in process_uploads
if not package.validate_packages(args, merged_packages[arch]):
File "./calm/package.py", line 680, in validate_packages
validate_package_maintainers(args, packages)
File "./calm/package.py", line 703, in validate_package_maintainers
if any(['_obsolete' in packages[p].version_hints[vr]['category'] for vr
in packages[p].version_hints]):
File "./calm/package.py", line 703, in <listcomp>
if any(['_obsolete' in packages[p].version_hints[vr]['category'] for vr
in packages[p].version_hints]):
KeyError: 'category'
Diff:
---
calm/package.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/calm/package.py b/calm/package.py
index 23954dd..cf9d242 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -700,7 +700,7 @@ def validate_package_maintainers(args, packages):
if packages[p].skip:
continue
# ignore obsolete packages
- if any(['_obsolete' in packages[p].version_hints[vr]['category'] for vr in packages[p].version_hints]):
+ if any(['_obsolete' in packages[p].version_hints[vr].get('category', '') for vr in packages[p].version_hints]):
continue
if not is_in_package_list(packages[p].path, all_packages):
logging.error("package '%s' is not in the package list" % (p))