X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fqueue_report.py;h=5e164285d8372599d8537bc922f644a77a99393c;hb=c8182c171aa569945e899566fdf6492cfb166d71;hp=98c80f0af85dd0b50bcbed1e6e8b856b80a2d11e;hpb=12aa4c9ae0c805b3c07eee1d7873e1d513010e98;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py index 98c80f0a..5e164285 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -43,9 +43,11 @@ except ImportError: pass from daklib import utils -from daklib.queue import Upload -from daklib.dbconn import DBConn, has_new_comment, DBChange, DBSource, get_uid_from_fingerprint +from daklib.dbconn import DBConn, DBSource, has_new_comment, PolicyQueue, \ + get_uid_from_fingerprint +from daklib.policy import PolicyQueueUploadHandler from daklib.textutils import fix_maintainer +from daklib.utils import get_logins_from_ldap from daklib.dak_exceptions import * Cnf = None @@ -56,7 +58,7 @@ row_number = 0 def usage(exit_code=0): print """Usage: dak queue-report -Prints a report of packages in queue directories (usually new and byhand). +Prints a report of packages in queues (usually new and byhand). -h, --help show this help and exit. -8, --822 writes 822 formated output to the location set in dak.conf @@ -115,7 +117,15 @@ def time_pp(x): def sg_compare (a, b): a = a[1] b = b[1] - """Sort by have note, time of oldest upload.""" + """Sort by have pending action, have note, time of oldest upload.""" + # Sort by have pending action + a_note_state = a["processed"] + b_note_state = b["processed"] + if a_note_state < b_note_state: + return -1 + elif a_note_state > b_note_state: + return 1 + # Sort by have note a_note_state = a["note_state"] b_note_state = b["note_state"] @@ -173,11 +183,12 @@ def header():
- +Hint: Age is the youngest upload of the package, if there is more than
one version.
- You may want to look at the REJECT-FAQ
+ You may want to look at the REJECT-FAQ
for possible reasons why one of the above packages may get rejected.
%s | " % (source) + if "sourceNEW" in trclass: + print "%s | " % (source) + else: + print "%(source)s | " % {'source': source} print ""
for vers in version.split():
print "%s " % (source, utils.html_escape(vers), utils.html_escape(vers)) @@ -308,18 +327,14 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing print "Changed-By: %s " % (utils.html_escape(mail), utils.html_escape(name)) if sponsor: - try: - (login, domain) = sponsor.split("@", 1) - print "Sponsor: %s@debian.org " % (utils.html_escape(login), utils.html_escape(login)) - except Exception, e: - pass + print "Sponsor: %s@debian.org " % (utils.html_escape(sponsor), utils.html_escape(sponsor)) print "Fingerprint: %s" % (fingerprint) print " | "
print ""
for close in closes:
- print "#%s " % (utils.html_escape(close), utils.html_escape(close)) + print "#%s " % (utils.html_escape(close), utils.html_escape(close)) print " |