# Generate Maintainers file used by e.g. the Debian Bug Tracking System
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: charisma,v 1.4 2001-03-02 02:24:33 troup Exp $
+# $Id: charisma,v 1.5 2001-03-15 01:59:18 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
global maintainer_from_source_cache
if not maintainer_from_source_cache.has_key(source_id):
- q = projectB.query("SELECT name FROM maintainer WHERE id IN (SELECT maintainer FROM source WHERE id = %s)" % (source_id));
+ q = projectB.query("SELECT m.name FROM maintainer m, source s WHERE s.id = %s and s.maintainer = m.id" % (source_id));
maintainer = q.getresult()[0][0]
maintainer_from_source_cache[source_id] = fix_maintainer(maintainer)
def main():
global Cnf, projectB;
- projectB = pg.connect('projectb', 'localhost');
-
apt_pkg.init();
Cnf = apt_pkg.newConfiguration();
extra_files = apt_pkg.ParseCommandLine(Cnf,[],sys.argv);
+ projectB = pg.connect('projectb', Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, Cnf["DB::ROUser"]);
+
for suite in Cnf.SubTree("Suite").List():
suite = string.lower(suite);
suite_priority = int(Cnf["Suite::%s::Priority" % (suite)]);