Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-05-14 19:54:03 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2018-05-14 19:54:03 +0300
commit7ee154d67d14272433a7ab2dd87e2e7378e763f2 (patch)
tree3dd077e6dc8ae3103623f3fff18f064b2c76d47f
parent61b82600b59f89ff0894da5357b837e502d04815 (diff)
Also remove versions which have no packages left, after expiry
-rwxr-xr-xcalm/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/calm/package.py b/calm/package.py
index 9cb5dd1..7575050 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1075,9 +1075,12 @@ def delete(packages, path, fn):
for t in packages[p].tars[vr]:
if t == fn:
del packages[p].tars[vr][t]
- # XXX: should also remove from vermap
break
+ # if no packages remain for this vr, also remove from vermap
+ if not packages[p].tars[vr]:
+ packages[p].vermap.pop(vr, None)
+
for h in packages[p].hint_files:
if packages[p].hint_files[h] == fn:
del packages[p].hint_files[h]