X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fqueue_report.py;h=af3bc58d534a9f445bbc3997f6d29c63fd85b5a0;hb=7174357ba1280a47cc1e701235767b413ef2bc1c;hp=ff3e082bbf73bb0eef76017b55697d410b8bbc97;hpb=ea17738cea735d71766bfc2bd082f59b3adf2dbb;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py old mode 100755 new mode 100644 index ff3e082b..af3bc58d --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -36,7 +36,7 @@ import copy, glob, os, stat, sys, time import apt_pkg -import daklib.queue +import daklib.queue import daklib.utils Cnf = None @@ -61,7 +61,7 @@ Prints a report of packages in queue directories (usually new and byhand). nf=notes, first nl=notes, last Age Keys: m=minutes, h=hours, d=days, w=weeks, o=months, y=years - + """ sys.exit(exit_code) @@ -119,77 +119,77 @@ def sg_compare (a, b): ############################################################ def sortfunc(a,b): - for sorting in direction: - (sortkey, way, time) = sorting - ret = 0 - if time == "m": - x=int(a[sortkey]/60) - y=int(b[sortkey]/60) - elif time == "h": - x=int(a[sortkey]/3600) - y=int(b[sortkey]/3600) - elif time == "d": - x=int(a[sortkey]/86400) - y=int(b[sortkey]/86400) - elif time == "w": - x=int(a[sortkey]/604800) - y=int(b[sortkey]/604800) - elif time == "o": - x=int(a[sortkey]/2419200) - y=int(b[sortkey]/2419200) - elif time == "y": - x=int(a[sortkey]/29030400) - y=int(b[sortkey]/29030400) - else: - x=a[sortkey] - y=b[sortkey] - if x < y: - ret = -1 - elif x > y: - ret = 1 - if ret != 0: - if way < 0: - ret = ret*-1 - return ret - return 0 + for sorting in direction: + (sortkey, way, time) = sorting + ret = 0 + if time == "m": + x=int(a[sortkey]/60) + y=int(b[sortkey]/60) + elif time == "h": + x=int(a[sortkey]/3600) + y=int(b[sortkey]/3600) + elif time == "d": + x=int(a[sortkey]/86400) + y=int(b[sortkey]/86400) + elif time == "w": + x=int(a[sortkey]/604800) + y=int(b[sortkey]/604800) + elif time == "o": + x=int(a[sortkey]/2419200) + y=int(b[sortkey]/2419200) + elif time == "y": + x=int(a[sortkey]/29030400) + y=int(b[sortkey]/29030400) + else: + x=a[sortkey] + y=b[sortkey] + if x < y: + ret = -1 + elif x > y: + ret = 1 + if ret != 0: + if way < 0: + ret = ret*-1 + return ret + return 0 ############################################################ def header(): print """ -
-
+
+ +
|
Timestamp: %s (UTC)
" % (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime())) @@ -197,7 +197,7 @@ def footer(): print "You may want to look at the REJECT-FAQ for possible reasons why one of the above packages may get rejected.
" print """ - + """ @@ -206,16 +206,16 @@ def footer(): def table_header(type): print "Package | -Version | -Arch | -Distribution | -Age | -Maintainer | -Closes | -
---|---|---|---|---|---|---|
Package | +Version | +Arch | +Distribution | +Age | +Maintainer | +Closes | +