X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fexamine_package.py;h=72e098d562b91a03b7dcf0ac5b39732bc7b24b89;hb=76cc6b0f163f76c4bdcaceebf55a68348924c598;hp=31c417bac8969682ae9ff0528f8a6e2a66b56275;hpb=f56058049885c86071f354d70d69959de8a4cd53;p=dak.git diff --git a/dak/examine_package.py b/dak/examine_package.py index 31c417ba..72e098d5 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: latin-1 -*- # Script to automate some parts of checking NEW packages # Copyright (C) 2000, 2001, 2002, 2003, 2006 James Troup @@ -33,9 +32,9 @@ ################################################################################ -import errno, os, pg, re, sys, md5, time +import errno, os, pg, re, sys, md5 import apt_pkg, apt_inst -import daklib.database, daklib.utils +import daklib.database, daklib.utils, daklib.queue ################################################################################ @@ -100,7 +99,7 @@ def escape_if_needed(s): def headline(s, level=2): if use_html: - print "%s" % (level,html_escape(s),level) + print "%s" % (level, html_escape(s), level) else: print "---- %s ----" % (s) @@ -333,16 +332,15 @@ def output_deb_info(filename): else: output += escape_if_needed(control.Find(key)) to_print += output + '\n' - print_formatted_text(to_print) + print_escaped_text(to_print) def do_command (command, filename): o = os.popen("%s %s" % (command, filename)) print_formatted_text(o.read()) def do_lintian (filename): - # lintian currently does not have html coloring, so dont use color for lintian (yet) if use_html: - do_command("lintian --show-overrides", filename) + do_command("lintian --show-overrides --color html", filename) else: do_command("lintian --show-overrides --color always", filename) @@ -392,7 +390,7 @@ def check_deb (deb_filename): output_deb_info(deb_filename) if is_a_udeb: - headline("skipping lintian check for µdeb") + headline("skipping lintian check for udeb") print else: headline("lintian check for %s" % (filename)) @@ -404,7 +402,7 @@ def check_deb (deb_filename): do_command ("dpkg -c", deb_filename) if is_a_udeb: - headline("skipping copyright for µdeb") + headline("skipping copyright for udeb") else: headline("copyright of %s" % (filename)) print_copyright(deb_filename) @@ -463,7 +461,7 @@ def main (): # Cnf = daklib.utils.get_conf() Arguments = [('h',"help","Examine-Package::Options::Help"), - ('H',"Html-output","Examine-Package::Options::Html-Output"), + ('H',"html-output","Examine-Package::Options::Html-Output"), ] for i in [ "Help", "Html-Output", "partial-html" ]: if not Cnf.has_key("Examine-Package::Options::%s" % (i)):