public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200328-2-g758465b
@ 2020-03-29 14:24 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2020-03-29 14:24 UTC (permalink / raw)
  To: cygwin-apps-cvs




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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-29 14:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-29 14:24 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200328-2-g758465b Jon TURNEY

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).