X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=cindy;h=35382033e4545ad486fd162889e620dc52801372;hb=fb4f73664b315abf14ecb2e140e772607a0761b8;hp=9f2393399a9087b326d22da1f0a4075ac8609d0a;hpb=2f5e692bfbbb6f8146f50d944f7fcc169a95a0a3;p=dak.git diff --git a/cindy b/cindy index 9f239339..35382033 100755 --- a/cindy +++ b/cindy @@ -1,8 +1,8 @@ #!/usr/bin/env python -# Output override files for apt-ftparchive and indices/ -# Copyright (C) 2000, 2001 James Troup -# $Id: cindy,v 1.6 2001-11-18 19:57:58 rmurray Exp $ +# Cruft checker for overrides +# Copyright (C) 2000, 2001, 2002 James Troup +# $Id: cindy,v 1.10 2002-05-23 09:54:23 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 @@ -20,12 +20,18 @@ ################################################################################ -# X-Listening-To: Sanitarium / Master of the Puppets - Metallica +###################################################################### +# NB: cindy is not a good idea with New Incoming as she doesn't take # +# into account accepted. You can minimize the impact of this by # +# running her immediately after katie but that's still racy because # +# lisa doesn't lock with katie. A better long term fix is the evil # +# plan for accepted to be in the DB. # +###################################################################### ################################################################################ -import pg, sys, string -import utils, db_access, natalie +import pg, sys; +import utils, db_access; import apt_pkg; ################################################################################ @@ -38,7 +44,7 @@ override = {} def process(suite, component, type): global override; - + suite_id = db_access.get_suite_id(suite); if suite_id == -1: utils.fubar("Suite '%s' not recognised." % (suite)); @@ -88,7 +94,7 @@ def process(suite, component, type): #projectB.query("DELETE FROM override WHERE package = '%s' AND suite = %s AND component = %s AND type = %s" #% (package, suite_id, component_id, type_id)); projectB.query("COMMIT WORK"); - + ################################################################################ @@ -96,10 +102,7 @@ def main (): global Cnf, projectB, override; Cnf = utils.get_conf() - Arguments = [('D',"debug","Denise::Options::Debug", "IntVal"), - ('h',"help","Denise::Options::Help"), - ('V',"version","Denise::Options::Version")]; - apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + apt_pkg.ParseCommandLine(Cnf,[],sys.argv); projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); @@ -109,7 +112,7 @@ def main (): for component in Cnf.SubTree("Component").List(): if component == "mixed": continue; # Ick - for type in Cnf.SubTree("OverrideType").List(): + for type in Cnf.ValueList("OverrideType"): print "Processing %s [%s - %s]..." % (suite, component, type); process(suite, component, type);