X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fexamine_package.py;h=c1de75763af6e4d9147d384cc68ed2817205eb7d;hb=2cb29a034e0d84778ecd8b063e853833dc666643;hp=e87cc281e802e1dbeb554e4a51972f793bd2d358;hpb=f40df055fa0d4b37b6aac772e40747b8285c8c7c;p=dak.git diff --git a/dak/examine_package.py b/dak/examine_package.py index e87cc281..c1de7576 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -32,7 +32,7 @@ ################################################################################ -import errno, os, pg, re, sys +import errno, os, pg, re, sys, md5 import apt_pkg, apt_inst import daklib.database, daklib.utils @@ -82,6 +82,8 @@ Cnf = daklib.utils.get_conf() projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])) daklib.database.init(Cnf, projectB) +printed_copyrights = {} + ################################################################################ def usage (exit_code=0): @@ -302,7 +304,16 @@ def print_copyright (deb_filename): return o = os.popen("ar p %s data.tar.gz | tar xzOf - %s" % (deb_filename, copyright)) - print o.read() + copyright = o.read() + copyrightmd5 = md5.md5(copyright).hexdigest() + + if printed_copyrights.has_key(copyrightmd5) and printed_copyrights[copyrightmd5] != "%s (%s)" % (package, deb_filename): + print "NOTE: Copyright is the same as %s.\n" % \ + (printed_copyrights[copyrightmd5]) + else: + printed_copyrights[copyrightmd5] = "%s (%s)" % (package, deb_filename) + + print copyright def check_dsc (dsc_filename): print "---- .dsc file for %s ----" % (dsc_filename) @@ -322,11 +333,11 @@ def check_deb (deb_filename): output_deb_info(deb_filename) if is_a_udeb: - print "---- skipping lintian check for µdeb ----" + print "---- skipping lintian check for udeb ----" print else: print "---- lintian check for %s ----" % (filename) - do_command ("lintian", deb_filename) + do_command ("lintian --show-overrides --color always", deb_filename) print "---- linda check for %s ----" % (filename) do_command ("linda", deb_filename) @@ -334,7 +345,7 @@ def check_deb (deb_filename): do_command ("dpkg -c", deb_filename) if is_a_udeb: - print "---- skipping copyright for µdeb ----" + print "---- skipping copyright for udeb ----" else: print "---- copyright of %s ----" % (filename) print_copyright(deb_filename)