]> git.decadent.org.uk Git - dak.git/blobdiff - dak/examine_package.py
examine_package: Add --show-overrides to lintian invocation, call them
[dak.git] / dak / examine_package.py
index e87cc281e802e1dbeb554e4a51972f793bd2d358..c1de75763af6e4d9147d384cc68ed2817205eb7d 100755 (executable)
@@ -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)