public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200328-2-g758465b
Date: Sun, 29 Mar 2020 14:24:19 +0000 (GMT)	[thread overview]
Message-ID: <20200329142419.06209385E001@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=758465b6105cac90244153a3d3ded4e892579fc8

commit 758465b6105cac90244153a3d3ded4e892579fc8
Author: Jon Turney <jon.turney@dronecode.org.uk>
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 <jon.turney@dronecode.org.uk>
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



                 reply	other threads:[~2020-03-29 14:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200329142419.06209385E001@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).