From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 06209385E001; Sun, 29 Mar 2020 14:24:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06209385E001 To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200328-2-g758465b X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b6aac0e22c9520bf801d0b4340d3bdacbd455b73 X-Git-Newrev: 758465b6105cac90244153a3d3ded4e892579fc8 Message-Id: <20200329142419.06209385E001@sourceware.org> Date: Sun, 29 Mar 2020 14:24:19 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 14:24:19 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=758465b6105cac90244153a3d3ded4e892579fc8 commit 758465b6105cac90244153a3d3ded4e892579fc8 Author: Jon Turney Date: Sun Mar 29 14:26:41 2020 +0100 Ignore .bak files in upload area that hint fixer might create https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=7da8ec944a3b75d1a24aa10163612bab1c685c37 commit 7da8ec944a3b75d1a24aa10163612bab1c685c37 Author: Jon Turney Date: Tue Feb 18 14:32:19 2020 +0000 Fix an exception when an external-source package is errored Diff: --- calm/package.py | 11 ++++++----- calm/uploads.py | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/calm/package.py b/calm/package.py index c57ad91..9697201 100755 --- a/calm/package.py +++ b/calm/package.py @@ -930,11 +930,12 @@ def validate_package_maintainers(args, packages): bv = packages[p].best_version if bv: es = packages[p].version_hints[bv].get('external-source', p) - es_pn = packages[es].orig_name - if es_pn not in all_packages and p not in all_packages: - if bv not in past_mistakes.maint_anomalies.get(p, []): - logging.error("package '%s' is not obsolete, but has no maintainer" % (p)) - error = True + if es in packages: + es_pn = packages[es].orig_name + if es_pn not in all_packages and p not in all_packages: + if bv not in past_mistakes.maint_anomalies.get(p, []): + logging.error("package '%s' is not obsolete, but has no maintainer" % (p)) + error = True return error diff --git a/calm/uploads.py b/calm/uploads.py index 1794257..fe938fa 100644 --- a/calm/uploads.py +++ b/calm/uploads.py @@ -79,10 +79,15 @@ def scan(m, all_packages, arch, args): logging.debug("reminder-timestamp %d, interval %d, next reminder %d, current time %d" % (m.reminder_time, REMINDER_INTERVAL, m.reminder_time + REMINDER_INTERVAL, time.time())) # scan package directories - for (dirpath, subdirs, files) in os.walk(os.path.join(basedir, 'release')): + for (dirpath, _subdirs, files) in os.walk(os.path.join(basedir, 'release')): relpath = os.path.relpath(dirpath, m.homedir()) removed_files = [] + # filter out files we don't need to consider + for f in sorted(files): + if f.endswith('.bak'): + files.remove(f) + # skip uninteresting directories if (not files) or (relpath == os.path.join(arch, 'release')): continue