extras-repoclosure rc-report.py,1.57,1.58

Michael Schwendt mschwendt at fedoraproject.org
Mon Dec 15 18:49:38 UTC 2008


Author: mschwendt

Update of /cvs/fedora/extras-repoclosure
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8788

Modified Files:
	rc-report.py 
Log Message:
include info about number of co-owners


Index: rc-report.py
===================================================================
RCS file: /cvs/fedora/extras-repoclosure/rc-report.py,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- rc-report.py	25 Oct 2008 15:53:29 -0000	1.57
+++ rc-report.py	15 Dec 2008 18:49:38 -0000	1.58
@@ -250,6 +250,9 @@
             b.report.append( line.rstrip() )
 
 
+def bdSortBySrcName(a,b):
+    return cmp(a.srpm_name.lower(),b.srpm_name.lower())
+
 def bdSortByOwnerAndName(a,b):
     r = cmp(a.owner,b.owner)
     if r==0:  # equal?
@@ -321,8 +324,25 @@
 summail += reportssummary
 
 if not opts.noowners and len(brokendeps):
-    summail += ('Summary of broken packages (by owner):\n')
+    summail += ('Summary of broken packages (by src.rpm name):\n\n')
+    brokendeps.sort(bdSortBySrcName)
+    seenbefore = []
+    for b in brokendeps:
+        if b.srpm_name not in seenbefore:
+            summail += '    '+b.srpm_name+'\n'
+            seenbefore.append(b.srpm_name)
+    summail += '\n\n'
+
+# TODO: Review -- in times of Fedora pkgdb and alias addresses for
+# package owners these summaries are not too useful anymore.
+# Especially the full expanded list of packages for all co-owners
+# would be rather long and boring. Hence only a summary for
+# the primary pkg owner is generated.
+
+if not opts.noowners and len(brokendeps):
+    summail += ('Summary of broken packages (by primary owner):\n')
     brokendeps.sort(bdSortByOwnerAndName)
+    seenbefore = []
     o = None
     for b in brokendeps:
         if o != b.owner:
@@ -330,7 +350,14 @@
             seenbefore = []
             summail += '\n    '+b.owner.replace('@',' AT ')+'\n'
         if b.srpm_name not in seenbefore:
-            summail += '        '+b.srpm_name+'\n'
+            line = '        '+b.srpm_name
+            if len(b.coowners):
+                if len(line)<40:
+                    line += ' '*(40-len(line))
+                else:
+                    line += '    '
+                line += '(%i co-owners)'%len(b.coowners)
+            summail += line+'\n'
             seenbefore.append(b.srpm_name)
 
 # Broken deps sorted by repository id.




More information about the fedora-extras-commits mailing list