3 # Generate file list for unstable_accepted
4 # Copyright (C) 2002 James Troup <james@nocrew.org>
5 # $Id: cameron,v 1.1 2002-05-05 19:59:32 rmurray Exp $
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ################################################################################
23 import pg, string, os, sys
25 import db_access, utils, claire, logging
27 ################################################################################
33 ################################################################################
38 Cnf = utils.get_conf()
40 Arguments = [('h',"help","Cameron::Options::Help")];
42 apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
44 projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]));
45 db_access.init(Cnf, projectB);
46 list = utils.open_file("%s/unstable_accepted.list" % (Cnf["Dir::ListsDir"]), "w")
47 q = projectB.query("SELECT filename FROM unstable_accepted WHERE in_accepted AND filename ~ '(u?deb|dsc)$'");
48 entries = q.getresult();
50 filename = os.path.dirname(entry[0])+'/incoming/'+os.path.basename(entry[0]);
51 list.write("%s\n" % (filename))
54 #########################################################################################
56 if __name__ == '__main__':