public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-14-gfd03d0e
@ 2021-05-17 14:33 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2021-05-17 14:33 UTC (permalink / raw)
  To: cygwin-apps-cvs




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

commit fd03d0e762498b21ed7ac53b09feae2372faadb0
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon May 17 14:57:22 2021 +0100

    Fix a crash when all versions of a package are getting removed
    
    > Traceback (most recent call last):
    >   File "/sourceware1/cygwin-staging/calm/calm/calm.py", line 578, in do_daemon
    >     state.packages = process_uploads(args, state)
    >   File "/sourceware1/cygwin-staging/calm/calm/calm.py", line 190, in process_uploads
    >     if not package.validate_packages(args, merged_packages[arch]):
    >   File "/sourceware1/cygwin-staging/calm/calm/package.py", line 844, in validate_packages
    >     if any(['_obsolete' in packages[install_p].version_hints[vr].get('category', '') for vr in packages[install_p].version_hints]):
    > KeyError: 'amd'


Diff:
---
 calm/package.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/calm/package.py b/calm/package.py
index 9c47f47..1e5b0f1 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -840,6 +840,10 @@ def validate_packages(args, packages):
         versions = defaultdict(list)
 
         for install_p in packages[source_p].is_used_by:
+            # ignore package which are getting removed
+            if install_p not in packages:
+                continue
+
             # ignore obsolete packages
             if any(['_obsolete' in packages[install_p].version_hints[vr].get('category', '') for vr in packages[install_p].version_hints]):
                 continue



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

only message in thread, other threads:[~2021-05-17 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 14:33 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-14-gfd03d0e 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).