X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fqueue_report.py;h=9de1f5459dbfa4ac72f63cc1e861026f71609138;hb=7a23455cf4a831e599172f48ce29178e64dc09db;hp=5fd9288a8c6da8711b48e1eff274f213e169c955;hpb=e2c4fd7f21c3b33cd7192bded5d6373e0ee90374;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py index 5fd9288a..9de1f545 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -179,6 +179,7 @@ def header(): Debian NEW and BYHAND Packages @@ -246,8 +248,8 @@ def table_header(type, source_count, total_count): print "

Summary for: %s

" % (type) print "

Summary for: binary-%s only

" % (type) print """ +

Click to toggle all/binary-NEW packages

-

Click to toggle all/binary-NEW packages

" % (trclass) - print "" % (source) + if "binNEW" in trclass: + print "" % (source) + else: + print "" % {'source': source} print "
""" print "Package count in %s: %s |  Total Package count: %s" % (type, source_count, total_count) @@ -290,7 +292,10 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing else: print "
%s%s%(source)s" for vers in version.split(): print "%s
" % (source, utils.html_escape(vers), utils.html_escape(vers)) @@ -311,7 +316,7 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing if sponsor: try: (login, domain) = sponsor.split("@", 1) - print "Sponsor: %s@debian.org
" % (utils.html_escape(login), utils.html_escape(login)) + print "Sponsor: %s@debian.org
" % (utils.html_escape(login), utils.html_escape(login)) except Exception as e: pass @@ -365,6 +370,7 @@ RRA:MAX:0.5:288:795 def process_changes_files(changes_files, type, log, rrd_dir): msg = "" cache = {} + unprocessed = [] # Read in all the .changes files for filename in changes_files: try: @@ -378,6 +384,9 @@ def process_changes_files(changes_files, type, log, rrd_dir): # Divide the .changes into per-source groups per_source = {} for filename in cache.keys(): + if not cache[filename].has_key("source"): + unprocessed.append(filename) + continue source = cache[filename]["source"] if not per_source.has_key(source): per_source[source] = {} @@ -550,7 +559,7 @@ def process_changes_files(changes_files, type, log, rrd_dir): (name, mail) = changedby.split(":", 1) log.write("Changed-By: " + name + " <"+mail+">" + "\n") if sponsor: - log.write("Sponsored-By: " + sponsor + "\n") + log.write("Sponsored-By: " + "@".join(sponsor.split("@")[:2]) + "\n") log.write("Distribution:") for dist in distribution: log.write(" " + dist) @@ -596,6 +605,12 @@ def process_changes_files(changes_files, type, log, rrd_dir): print "%s %s source package%s / %s %s package%s in total." % (source_count, type, plural(source_count), total_count, type, plural(total_count)) print + if len(unprocessed): + print "UNPROCESSED" + print "-----------" + for u in unprocessed: + print u + print ################################################################################ @@ -614,9 +629,9 @@ def main(): if not Cnf.has_key("Queue-Report::Options::%s" % (i)): Cnf["Queue-Report::Options::%s" % (i)] = "" - apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv) + apt_pkg.parse_commandline(Cnf, Arguments, sys.argv) - Options = Cnf.SubTree("Queue-Report::Options") + Options = Cnf.subtree("Queue-Report::Options") if Options["Help"]: usage() @@ -632,7 +647,7 @@ def main(): for i in Cnf["Queue-Report::Options::Directories"].split(","): queue_names.append(i) elif Cnf.has_key("Queue-Report::Directories"): - queue_names = Cnf.ValueList("Queue-Report::Directories") + queue_names = Cnf.value_list("Queue-Report::Directories") else: queue_names = [ "byhand", "new" ]