This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-61-gece907f




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

commit ece907f71b7148b0eb1ad207a32eb6408d2d4940
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Apr 9 18:39:21 2017 +0100

    Improve 'should be categorized obsolete' test to apply to each version
    
    There are some ligitimate cases of this condition, so this is only logged at
    info severity.


Diff:
---
 calm/package.py |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/calm/package.py b/calm/package.py
index 2891e0d..a2ec6f8 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -561,23 +561,15 @@ def validate_packages(args, packages):
             packages[p].best_version = None
             error = True
 
-        # If, for every stability level, the install tarball is empty and there
-        # is no source tarball, we should probably be marked obsolete
+        # If the install tarball is empty and there is no source tarball, we
+        # should probably be marked obsolete
         if not packages[p].skip:
-            if not obsolete:
-                has_something = False
-
-                for l in ['test', 'curr', 'prev']:
-                    if l in packages[p].stability:
-                        v = packages[p].stability[l]
-                        if 'source' in packages[p].vermap[v]:
-                            has_something = True
-                        elif 'install' in packages[p].vermap[v]:
-                            if not packages[p].tars[packages[p].vermap[v]['install']].is_empty:
-                                has_something = True
-
-                if not has_something:
-                    logging.warning("package '%s' has empty install tar file and no source for all levels, but it's not in the _obsolete category" % (p))
+            for vr in packages[p].version_hints:
+                if '_obsolete' not in packages[p].version_hints[vr].get('category', ''):
+                    if 'source' not in packages[p].vermap[vr]:
+                        if 'install' in packages[p].vermap[vr]:
+                            if packages[p].tars[packages[p].vermap[vr]['install']].is_empty:
+                                logging.info("package '%s' version '%s' has empty install tar file and no source, but it's not in the _obsolete category" % (p, vr))
 
     # make another pass to verify a source tarfile exists for every install
     # tarfile version
@@ -920,6 +912,9 @@ def mark_package_fresh(packages, p, v):
         return
 
     # unless the install tarfile is empty ...
+    if 'install' not in packages[p].vermap[v]:
+        return
+
     if packages[p].tars[packages[p].vermap[v]['install']].is_empty:
         return
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]