[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200401-1-g7c85c8c

Jon TURNEY via Cygwin-apps-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


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

commit 7c85c8c739c547aebe67476149b466071b74da45
Author: Jon Turney <[email protected]>
Date:   Fri Apr 3 17:26:12 2020 +0100

    Fix freshness tracking for source packages


Diff:
---
 calm/package.py | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/calm/package.py b/calm/package.py
index 9697201..180a343 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1319,21 +1319,14 @@ def mark_package_fresh(packages, p, v):
     if 'install' in packages[p].vermap[v]:
         packages[p].tar(v, 'install').fresh = True
 
-    if 'source' in packages[p].vermap[v]:
-        packages[p].tar(v, 'source').fresh = True
-        return
-
-    # unless the install tarfile is empty ...
-    if 'install' not in packages[p].vermap[v]:
-        return
-
-    if packages[p].tar(v, 'install').is_empty:
-        return
-
-    # ... mark any corresponding external-source package version as also fresh
+    # ... mark any corresponding sibling or external-source package version as also fresh
     if 'external-source' in packages[p].version_hints[v]:
         es_p = packages[p].version_hints[v]['external-source']
-        if es_p in packages:
+    else:
+        es_p = p + '-src'
+
+    if es_p in packages:
+        if v in packages[es_p].vermap:
             if 'source' in packages[es_p].vermap[v]:
                 packages[es_p].tar(v, 'source').fresh = True
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.