3 # Generate file list for unstable_accepted
4 # Copyright (C) 2002 Ryan Murray <rmurray@debian.org>
5 # $Id: cameron,v 1.3 2002-05-15 07:54:28 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 ################################################################################
25 import db_access, utils;
27 ################################################################################
30 Cnf = utils.get_conf();
32 apt_pkg.ParseCommandLine(Cnf,[],sys.argv);
34 projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]));
35 db_access.init(Cnf, projectB);
36 list = utils.open_file("%s/unstable_accepted.list" % (Cnf["Dir::Lists"]), "w");
37 q = projectB.query("SELECT filename FROM unstable_accepted WHERE in_accepted AND filename ~ '(u?deb|dsc)$'");
38 for entry in q.getresult():
39 filename = os.path.join(os.path.dirname(entry[0]),'incoming',os.path.basename(entry[0]));
40 list.write("%s\n" % (filename));
43 ################################################################################
45 if __name__ == '__main__':