From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41192 invoked by alias); 6 Oct 2017 11:35:04 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 40190 invoked by uid 9795); 6 Oct 2017 11:35:03 -0000 Date: Fri, 06 Oct 2017 11:35:00 -0000 Message-ID: <20171006113503.40061.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-96-g3e00aa0 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 63037d2cfeb1caf0929d30fd170927dcb1d0a84e X-Git-Newrev: 3e00aa05586a70468332fe280678ed6a2f6ea9c4 X-SW-Source: 2017-q4/txt/msg00006.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=3e00aa05586a70468332fe280678ed6a2f6ea9c4 commit 3e00aa05586a70468332fe280678ed6a2f6ea9c4 Author: Jon Turney 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 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))