commit e55cd5aea56f595a77692e52b6bcca5dbffe28e2
Author: Jan RÄ™korajski <[email protected]>
Date:   Fri Jan 4 22:28:24 2019 +0900

    Separate packages with fractional release in freshness information

 wwwbin/ftp-freshness.py | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/wwwbin/ftp-freshness.py b/wwwbin/ftp-freshness.py
index 2e52da2..63b7a94 100755
--- a/wwwbin/ftp-freshness.py
+++ b/wwwbin/ftp-freshness.py
@@ -93,7 +93,7 @@ class Pkgs(object):
                        if rpm_cvs_vr < 0 and cvs_rpm_vr > 0 and cvs_nvr[1] == 
pkg_nvr[1]:
                                self.cvs_new_nvr.append(name)
 
-       def     prepare(self):
+       def prepare(self):
                self.cvs_new_nvr.sort()
                self.cvs_new_nvr = list(set(self.cvs_new_nvr))
                self.cvs_new_nv.sort()
@@ -118,20 +118,34 @@ class Pkgs(object):
                self.__update_cvs(name)
 
        def print_nvr(self):
-               print "*** VERSION-RELEASE COMPARE FOR THE SAME VERSIONS ONLY 
***"
+               ver_int = "*** VERSION-RELEASE COMPARE FOR THE SAME VERSIONS 
ONLY ***\n"
+               ver_frac = "*** PACKAGES WITH FRACTIONAL RELEASE ***\n"
                for name in self.cvs_new_nvr:
                        self.cvs_new_nvr.sort()
                        cvs_nvr = self.cvs[name]
                        pkg_nvr = self.pkg[name]
-                       print "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%s" % 
(name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
+                       msg = "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%\ns" % 
(name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
+                       if '.' in cvs_nvr[2]:
+                               ver_frac += msg
+                       else:
+                               ver_int += msg
+               print ver_int
+               print ver_frac
 
        def print_nv(self):
-               print "*** VERSION COMPARE ONLY ***"
+               ver_int = "*** VERSION COMPARE ONLY ***\n"
+               ver_frac = "*** PACKAGES WITH FRACTIONAL RELEASE ***\n"
                self.cvs_new_nv.sort()
                for name in self.cvs_new_nv:
                        cvs_nvr = self.cvs[name]
                        pkg_nvr = self.pkg[name]
-                       print "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%s" % 
(name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
+                       msg = "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%s\n" % 
(name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
+                       if '.' in cvs_nvr[2]:
+                               ver_frac += msg
+                       else:
+                               ver_int += msg
+               print ver_int
+               print ver_frac
 
 p = Pkgs()
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/e55cd5aea56f595a77692e52b6bcca5dbffe28e2

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to