X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tea;h=3e32ab6f80773c0bdd16e3ec37d72346b42d5a75;hb=d52ebffcc7af210985d90ffc58e7ecc4141dd8a8;hp=ff29e8d2cbf56c6e1418320bbf62763b3d8b1d52;hpb=a0b2b1aafec94c872ddcf2cd21dada1f0ab9240c;p=dak.git diff --git a/tea b/tea index ff29e8d2..3e32ab6f 100755 --- a/tea +++ b/tea @@ -2,7 +2,7 @@ # Sanity check the database # Copyright (C) 2000 James Troup -# $Id: tea,v 1.4 2001-01-28 09:06:44 troup Exp $ +# $Id: tea,v 1.5 2001-02-04 04:27:58 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -101,6 +101,25 @@ def check_dscs(): if count: sys.stderr.write("Found %s invalid .dsc files.\n" % (count)); +def check_override(): + for suite in [ "stable", "unstable" ]: + print suite + print "-------------" + print + suite_id = db_access.get_suite_id(suite); + q = projectB.query(""" +SELECT DISTINCT b.package FROM binaries b, bin_associations ba + WHERE b.id = ba.bin AND ba.suite = %s AND NOT EXISTS + (SELECT * FROM override o WHERE o.suite = %s AND o.package = b.package)""" + % (suite_id, suite_id)); + print q + q = projectB.query(""" +SELECT DISTINCT s.source FROM source s, src_associations sa + WHERE s.id = sa.source AND sa.suite = %s AND NOT EXISTS + (SELECT * FROM override o WHERE o.suite = %s and o.package = s.source)""" + % (suite_id, suite_id)); + print q + ################################################################################ def main (): @@ -119,7 +138,8 @@ def main (): projectB = pg.connect('projectb', 'localhost'); db_access.init(Cnf, projectB); - check_dscs(); + check_override(); + #check_dscs(); #check_files(); #######################################################################################