X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=cindy;h=65ff19e83ec9f96e9f1c79c3fcb98f9f04c5eea4;hb=d4c23de3a229e9d82d5e89af61df6f9b542b2503;hp=038a47964aa428b6226571320fa07fd8b8d12540;hpb=c1c7681bf43c58dd5cf34d1c1814a75ae594688b;p=dak.git diff --git a/cindy b/cindy index 038a4796..65ff19e8 100755 --- a/cindy +++ b/cindy @@ -2,7 +2,7 @@ # Output override files for apt-ftparchive and indices/ # Copyright (C) 2000, 2001 James Troup -# $Id: cindy,v 1.5 2001-11-04 22:28:44 troup Exp $ +# $Id: cindy,v 1.7 2002-02-12 22:13:06 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 @@ -24,8 +24,8 @@ ################################################################################ -import pg, sys, string -import utils, db_access, natalie +import pg, sys; +import utils, db_access; import apt_pkg; ################################################################################ @@ -38,7 +38,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,21 +88,15 @@ 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"); - + ################################################################################ def main (): global Cnf, projectB, override; - apt_pkg.init(); - - Cnf = apt_pkg.newConfiguration(); - apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); - Arguments = [('D',"debug","Denise::Options::Debug", "IntVal"), - ('h',"help","Denise::Options::Help"), - ('V',"version","Denise::Options::Version")]; - apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + Cnf = utils.get_conf() + apt_pkg.ParseCommandLine(Cnf,[],sys.argv); projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB);