[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200611-6-g29fe160
Jon TURNEY
jturney@sourceware.org
Sun Jul 19 15:55:45 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=29fe160616b52c4a65b5d6056a6eff36bfb01561
commit 29fe160616b52c4a65b5d6056a6eff36bfb01561
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Jul 19 16:02:59 2020 +0100
package.delete() also deletes empty packages
Once a Package object no longer contains any files (archives or hints),
it can be removed from the package set.
(This fixes calm complaining when it wants to vault a stale package
which had source, but no kept version does. Otherwise it complains that
the source package has no versions)
Diff:
---
calm/package.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/calm/package.py b/calm/package.py
index a1fed9a..4151c21 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1308,6 +1308,10 @@ def delete(packages, path, fn):
del packages[p].hints[h]
break
+ # if nothing remains, remove also from package set
+ if not packages[p].vermap and not packages[p].hints:
+ del packages[p]
+
#
# verify that the package path starts with a package in the list of packages
More information about the Cygwin-apps-cvs
mailing list